• Raj Kumar 88
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1

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


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


I have 2 custom objects Client Versions and QA Release. I would like to create a custom button on QA Release which when clicked creates a new record on Client Versions using data from the fields on QA Release.

Can anyone please give me a sample code for this? It can be URL hacking or Javascript.