You need to sign in to do that
Don't have an account?
Javascript equivalent to url += '&CF00NG0000008ODGm_lkid=' + '{!account.Id}';
I have the following button that was being used for classic. I have a script that can replace it. I'm missing how to reference the id for the masterdetail of the record where the button is located.
How do I pass the Id for the related account similar to the way it was done in the url?
classic:
url += '&CF00NG0000008ODGm=' + '{!account.Name}'.replace(regex2, "");
url += '&CF00NG0000008ODGm_lkid=' + '{!account.Id}';
url += '&00NG0000008ODGn=' + '{!account.BillingStreet}'.replace(regex, "");
Javascript
var leaseLoc = {};
leaseLoc ['Agreement__c'] = '{!Related_Agreement__c.Id}';
if('{!account}' != ''){
leaseLoc ['Account__c'] = '{!account.Id}';
leaseLoc ['Address__c'] = '{!account.BillingStreet}';