1

I have the following custom code that I am placing on the Opportunity object. I want to click this custom Send With DocuSign button and have it load the most recent's quote's attachments. My code is unfortunately not working. Is there something I am missing and need to add?

{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var rc = GetRelContentIDs("{!Opportunity.Id}");
var RQD = DSGetPageIDFromHref();
var LA = 1;
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RQD="+RQD+"&LA="+LA+"&RC="+rc;
user3582197
  • 59
  • 2
  • 9

1 Answers1

0

Are you getting a specific error message?

The second example from the documentation works for me:

https://www.docusign.com/sites/default/files/DocuSignForSalesforceReleaseNotesv4.1.17.pdf#page=2

{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")} 

var sourceId = DSGetPageIDFromHref(); 
var rc = GetRelContentIDs(sourceId); 
var LA = 1; 
window.location.href = 
"/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID="+sourceId+"&rc=
"+rc+"&RQD=" + sourceId+"&LA="+LA; 

I believe the issue you are running into is when you are adding the merge fields for the SourceID and RC parameter.

WTP API
  • 546
  • 3
  • 16
  • How would I be able to send via the Opportunity and only pull the Quote attachments? Using the code above, it will pull the Opportunity attachments. Would I just need to change the SourceId in the RC parameter? – user3582197 May 28 '14 at 17:49
  • Have you tried it yet? I simply used the example within the documentation and works perfect. I don't know the design behind the logic, but I'm assuming it's the Related Content parameter controls the attachment of the child object. In this case, the "Quote". – WTP API May 29 '14 at 20:25
  • 1
    Do you get a specific error message or does the QuotePDF just never get attached to the envelope? – WTP API Jun 02 '14 at 19:16
  • Are you attempting to attach the most recent "**Quote PDF**"? Or the most recent document from "**Notes and Attachments**"? The example above is specific to "**Quote PDFs**". – WTP API Jun 09 '14 at 18:40
  • That was it then. I was assuming that it would pull the notes and attachments. That makes sense now. Thanks! – user3582197 Jun 12 '14 at 17:55