We are using docusign in our organisation, We are passing SourceID as recordID using button javascript as below and we are getting value in "envelope external source id" field at docusign end.

window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&LA=0&SourceID={!Contract__c.Id}";

Now we have requirement in which we are creating envelop and sending it to docusign using docusign API method(CreateAndSendEnvelope(envelope)) but we don't know how to set & get value in "envelope external source id".

  • Did you resolve this? I'm trying to do the same thing
    – thegogz
    Commented Dec 2, 2015 at 12:58

1 Answer 1

    DocuSignAPI.CustomField field = new DocuSignAPI.CustomField (); 
    field.Name = 'DSFSSourceObjectId'; 
    field.Value = account.Id;    //value of your external source Id
    field.Show = 'false';
    DocuSignAPI.ArrayOfCustomField arrayOfCustomField = new DocuSignAPI.ArrayOfCustomField();
    arrayOfCustomField.CustomField  = new DocuSignAPI.CustomField[1];
    arrayOfCustomField.CustomField[0] = field;
    envelope.CustomFields = arrayOfCustomField;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .