
Below is the javascript code for custom button called 'create case' on Installed prod custom object .This object is present in account related list
Code details:
if(billtoemailrecords.length>0){
if(contactRecords.length>0){
alert('Contact Phone'+contactRecords[0].Phone);
if(contactRecords[0].Ship_To_Email_Address__c != billtoemailrecords[0].Bill_To_Email__c){
caseURL = "&00NU0000003bbT0="+contactRecords[0].FirstName +" "+contactRecords[0].LastName+"&00NU0000003Gr8c="+contactRecords[0].Phone+"&00NU0000003hN3q="+contactRecords[0].Ship_To_Email_Address__c+"&00N0P000005V2t7="+billtoemailrecords[0].Bill_To_Email__c+"&00N0P000005V2t6="+billtoemailrecords[0].FirstName+" "+billtoemailrecords[0].LastName
caseURL = caseURL.replace(/null/g,"");
}
}
else{
caseURL = "&00N0P000005V2t7="+billtoemailrecords[0].Bill_To_Email__c+"&00N0P000005V2t6="+billtoemailrecords[0].FirstName+" "+billtoemailrecords[0].LastName
caseURL = caseURL.replace(/null/g,"");
}
}
contactRecords[0].Phone value need to store in id 00NU0000003Gr8c (Phone number) , Contact record phone have value with + symbol on contact phone number field. But its not showing + before phone number after javascript button click on case record.
Can any one please help me how can i append the + symbol.
Regards,
Anjana
Hi Anjana,
In case you don't receive a response here, may I also suggest posting your query over to the developer forums for assistance with your code:
https://developer.salesforce.com/forums
https://salesforce.stackexchange.com/
Thanks!