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

edited March 2, 2017 in Questions
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

Comments

  • edited March 2, 2017
    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
  • edited November 23, 2016
    Thanks for your reply Christine. I do have the page title component associated with the correct custom object. With the console, I presume you are referring to the Salesforce/Developer console log as opposed to the browser log? I have attached a screenshot of the Salesforce console log. These are the only 4 line items that show up when i refresh the page and press the button. image If you are referring to the browser console log. The only error that I see is screenshotted below. Thanks again for your assistance. image
  • edited December 7, 2016
    I was referring to the browser console log, did the console.log line (console.log(row)) appear in the console log anywhere?
  • edited November 23, 2016
    Thanks for the prompt reply. No unfortunately I do not see that line anywhere in the log.
  • edited December 7, 2016
    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. 
  • edited November 23, 2016
    Well...that's embarrassing. Button works now after fixing that. Good catch and apologies for not catching this myself. Appreciate your help, thanks again!
  • edited December 7, 2016
    Wonderful!  Love it when it's a simple fix :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!