function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Custom setting issue while calling JavaScript onclick function.- Urgent!

Hi Guys,

I'm really stucked at my final stage of coding. I've created a custom button in lead section and i'm calling custom setting url in javascript code.
It works very well in my developer organization but it fails when I installs this in other developer organization.
Here is the code for your reference;


var uname = encodeURI('{!$Setup.UserDetails__c.UName__c}'); 
var ukey= encodeURI('{!$Setup.UserDetails__c.Sha1Key__c}');
var rurl= escape('/handleapprequest?email={!Lead.Email}&fname={!Lead.FirstName}&lastname={!Lead.LastName}&company={!Lead.Company}');'{!$Setup.UserDetails__c.Url__c}login/' + uname + '/'+ ukey +'?returnurl='+rurl, 'Send Email', 'height=600,location=no,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=1', 1)


When I install my package to different developer organization, the button which executes onClick javascript, thows an exception 'A problem with the OnClick JavaScript for this button or link was encountered: Field Setup.UserDetails__c.UName__c does not exists check spelling'
Please, let me know what is going wrong here? I've already created Beta package and I can not change or remove code from my developer org.
Thanks a lot.




Verify If the data is there in the Custom setting created in other developer orgainsation.