+ Start a Discussion

Docusign Envelope classic to Lightning

I am trying to make the Docusign JS Docusign button available in lightning. JS code of the classic button is similar to this - 


//********* 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='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';

DST = '00xxxxxxxxxxxx000000';
CCRM = 'Internal~Internal;Client~Client';
CCTM = 'Internal~Signer;Client~Signer';
CRL = 'Email~{!User.Email};LastName~{!User.LastName};';
CES = 'Test Email Subject';

//********* Page Callout (Do not modify) *********// 
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0 &SourceID={!Lead.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; 

What changes do i have to make in Lightning > Setup > Object > Buttons and Links >  to be able to e execute this button from Lightning? 

User-added image


AbhishekAbhishek (Salesforce Developers) 

Custom buttons were built with Javascript in Salesforce Classic and Salesforce Lightning does not support that.

Here's a Salesforce Blog post about that from 2016: (https://developer.salesforce.com/blogs/developer-relations/2016/09/why-its-time-to-break-up-with-javascript-buttons-and-embrace-lightning.html) JavaScript Buttons, Lightning, and You: A Blog Series.
For further reference, you can check this too,


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.