You need to sign in to do that
Don't have an account?
Raj Kumar 88
Hi ,
I found lots of post - https://success.salesforce.com/answers?id=90630000000gwhCAAQ.
I am doing the same thing, if i am using Name field only then it is working fine but
if i put lookup field then it is not working.
Customer_Name__c - Look Up field - Contact Lookup
Requested_By__c- Look Up Field - Contact Lookup
{!REQUIRESCRIPT("/soap/ajax/23.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/23.0/apex.js")}
var oppty = new sforce.SObject('SalesOrder__c');
oppty.Name = '{!LeadGen__c.Name}'; - Working fine if i assign Name field only
oppty.Customer_Name__c = '{!LeadGen__c.Account_NameId__c}'; -- Look up Field
oppty.Requested_By__c = '{!LeadGen__c.Contact_PersonId__c}'; -- Look up Field
result = sforce.connection.create([oppty]);
Both objects are custom.
Please help to resolve this issue. if i am wrong then please let me know
Thanks in advance
How to create a custom button on one object that inserts record in other object of look up value?
Hi ,
I found lots of post - https://success.salesforce.com/answers?id=90630000000gwhCAAQ.
I am doing the same thing, if i am using Name field only then it is working fine but
if i put lookup field then it is not working.
Customer_Name__c - Look Up field - Contact Lookup
Requested_By__c- Look Up Field - Contact Lookup
{!REQUIRESCRIPT("/soap/ajax/23.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/23.0/apex.js")}
var oppty = new sforce.SObject('SalesOrder__c');
oppty.Name = '{!LeadGen__c.Name}'; - Working fine if i assign Name field only
oppty.Customer_Name__c = '{!LeadGen__c.Account_NameId__c}'; -- Look up Field
oppty.Requested_By__c = '{!LeadGen__c.Contact_PersonId__c}'; -- Look up Field
result = sforce.connection.create([oppty]);
Both objects are custom.
Please help to resolve this issue. if i am wrong then please let me know
Thanks in advance
@Raj Kumar 88:
You can refer to my respone in the below post:
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000Au5OIAS
Hope it helps:
Thanks,
balaji