You need to sign in to do that
Don't have an account?

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;
{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")} var uname = encodeURI('{!$Setup.UserDetails__c.UName__c}'); var ukey= encodeURI('{!$Setup.UserDetails__c.Sha1Key__c}'); try{ var rurl= escape('/handleapprequest?email={!Lead.Email}&fname={!Lead.FirstName}&lastname={!Lead.LastName}&company={!Lead.Company}'); window.open('{!$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) }catch(err) {alert(err);}
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.
Hi,
Verify If the data is there in the Custom setting created in other developer orgainsation.
Thanks,
Kunal