You need to sign in to do that
Don't have an account?
Rachel Brozinick
Pulling Account Fields with Javascript button
I have a DocuSign Button I am creating. My client is sending from the Opportunity. I want to be able pull a field called Dedicated_CS_Rep__c from the account related to that Opportunity. Dedicated_Rep__c is a lookup field from the User. Here's my code:
Whenever I try to send, i am getting this error:
I did make sure there was a value listed on the Account that I was testing. What am I missing?
Thanks!
Rachel
function getDedicatedCSRep (oppId) { var result = sforce.connection.query("select Opportunity.Id, Account.Name, Account.Dedicated_CS_Rep__c from Opportunity where Id = '" + oppId + "' "); if(!result || result['size'] != 1) { return null; } var AccountRep = result.getArray('records')[0]; return AccountRep.Opportunity; } var dedicatedContact = getDedicatedCSRep('{!Opportunity.Id}');
Whenever I try to send, i am getting this error:
I did make sure there was a value listed on the Account that I was testing. What am I missing?
Thanks!
Rachel
http://stackoverflow.com/questions/6550795/uncaught-typeerror-cannot-read-property-value-of-undefined
http://stackoverflow.com/questions/8004617/javascript-cannot-read-property-bar-of-undefined