1

I'm attempting to build a custom button with DocuSign for Salesforce.

The goal is to automatically populate contacts within Contact Roles Related list as Recipients for my envelope.

However, I'm having trouble referencing Salesforce standard fields. I found this guide below, but still struggling.

http://help.salesforce.com/help/pdfs/en/salesforce_field_names_reference.pdf#page=9

This was very simple for custom objects and fields.

My button logic is below:

var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';var CRL='';

CRCL='Account.ContactRoles__r,FirstName~Account.Contact.FirstName;Email~Account.Contact.Email;Role~Role';

CCTM='Other~Signer';

CCRM='Other~Signer 1';


window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Account.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES+"&CRL="+CRL;

I don't receive any errors. I'm just redirected to the docusign_editenvelope visualforce page without the contact I referenced in the ContactRoles related list.

Any advice is appreciated.

WTP API
  • 546
  • 3
  • 16

1 Answers1

0

Here is a work around for what you want, as off of Account, the Contact Roles mechanism is not working:

Stack Overflow Workaround using Jscript and SOQL

Now here below is a working example off of Opportunity where it behaves like you and I expect using Decision Maker Role vs Other.

Please see my other Post Stack Overflow generic DocuSign Jscript custom button I prefer where I show a Generic Sample with Debug, Try Catch, etc as I like to make them, but this below is for brevity to compare against yours:

var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';var CRL='';

CRL = '{!URLENCODE("Email~dgrigsby@dgrigsby.com;LastName~David Grigsby (per);Role~R2;,Email~david.grigsby@docusign.com;LastName~David Grigsby;Role~R3;,LoadDefaultContacts~1")}';

CCRM = 'Decision Maker~Signer 1;R2~Signer 2;R3~Signer 3';

CCTM = 'Decision Maker~Signer;R2~Signer;R3~Carbon Copy';

window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES+"&CRL="+CRL;
Community
  • 1
  • 1
David W Grigsby
  • 1,554
  • 1
  • 13
  • 23
  • I have DocuSign internal engineering researching this and if a bug or not by design, I will update this article once I find out. – David W Grigsby Oct 22 '14 at 23:15