Send with Docusign Button on Custom Object's Record Detail Page

  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Good evening,

I am looking to implement the "Send with Docusign" button on the record detail page for a custom object we have created. I have attempted some of the solutions listed in previous threads here:

https://community.skuid.com/skuid/top...

Specifically, I created a Javascript Item. Resource location: External; Resource name: DocuSign_JavaScript; Resource URL: /apex/dsfs__DocuSign_Javascript

I created an In-Line Snippet with the name Send_With_DocuSign. Snippet body:
var params = arguments[0], $ = skuid.$;
//********* Option Declarations (Do not modify )*********//
var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='1';var SSB='1';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';
//*************************************************//
var CEM="This is the Email Body.";
var CES='This is the Email Subject';
var DST = 'This is the DocuSign Template ID';
var row = params.row || params.model.getFirstRow();
// write row data to console
console.log(row);
// var CRL = 'FirstName~' + row.FirstNameField + ';LastName~' + row.FirstNameField + ';Email~' + row.EmailField + ';Role~Customer;RoutingOrder~1';
//********* Page Callout (Do not modify) *********//
window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID=" + row.Id + "&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&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;

I then created a Custom Button to run a skuid snippet. Snippet name: Send_With_Docusign.

However, nothing happens when I press the button. Any advice would be much appreciated. I am not looking to do anything fancy, like specify which Docusign template, or what goes in the email body, etc. I just want the button to launch to the generic Send with Docusign screen that happens when you click the button on non-Skuid pages.

Thanks,

Dave
Photo of Dave Dewan

Dave Dewan

  • 460 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Christine Jessen

Christine Jessen

  • 670 Points 500 badge 2x thumb
Hi Dave, 

Thanks for your question.  Do you have the correct model associated with your custom button (on the Page Title component)?  

Are you seeing any console log errors?  In Chrome, you can press CTRL+SHIFT+J to see your console log, and copy and paste any errors you see here and we can investigate.

Christine
Photo of Christine Jessen

Christine Jessen

  • 670 Points 500 badge 2x thumb
I was referring to the browser console log, did the console.log line (console.log(row)) appear in the console log anywhere?
Photo of Dave Dewan

Dave Dewan

  • 460 Points 250 badge 2x thumb
Thanks for the prompt reply. No unfortunately I do not see that line anywhere in the log.
Photo of Christine Jessen

Christine Jessen

  • 670 Points 500 badge 2x thumb
That makes it seem like the script isn't even running...can you ensure that your snippet names are EXACTLY the same?  I see that you created a snippet named "Send_With_DocuSign" and then you said you created a button calling a snippet "Send_With_Docusign".  These two names don't match up since it's case-sensitive. 
Photo of Dave Dewan

Dave Dewan

  • 460 Points 250 badge 2x thumb
Well...that's embarrassing. Button works now after fixing that. Good catch and apologies for not catching this myself. Appreciate your help, thanks again!
Photo of Christine Jessen

Christine Jessen

  • 670 Points 500 badge 2x thumb
Wonderful!  Love it when it's a simple fix :)