Hello,
Can someone help me converting below from JavaScript to Lightning component please?
Hello,
Could you help me with button below? I want to convert it to Lightning component and not sure how. Any help please?
{!REQUIRESCRIPT("/apex/DocuSign_JavaScript")}
//********* 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="8DF80BBE-868E-41D8-8E15-586C7E143304"; //DS Template
CES="PRQ Request for Supplier Payment"; //Custom Email Subject
CEM='Hi, please can you process payment for supplier in the attached PRQ form and sign the form as confirmation that it has been completed. Cheers,'; //Email Message
CRL='Email~;LastName~;Role~Team Manager;RoutingOrder~1,Email~surface.accounts@statravel.co.uk;LastName~Surface Accounts;Role~Surface Accounts;RoutingOrder~2,Email~;LastName~;Role~Sales Team;RoutingOrder~3,Email~surface.accounts@statravel.co.uk;LastName~Surface Accounts;Role~Surface Accounts;RoutingOrder~3'; //Custom Recipient List
CCRM='Team Manager~Team Manager;Surface Accounts~Surface Accounts;Sales Team~Sales Team'; //Contact Role Map - Map SF role to specified DS role
CCTM='Sales Team~Carbon Copy;Surface Accounts~Carbon Copy';
LA='0'; //Attachments
//OCO = 'Send'; //Once Click Option
//********* Page Callout (Do not modify) *********//
window.location.href ="/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.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;
//*******************************************//
Thanks A lot!!!
@Anastasia Gklantzouni Since your Docusign custom button does not have any validations and you're just setting variables to be used in your URL callout, Docusign's recommendation is to refactor this Javascript button in to a URL custom button. I'd suggest setting up a call with Docusign Support and they can likely help you walk through this in more detail. If Custom Metadata Types are supported within the context of a URL button, you could put all those hardcoded strings in a Custom Metadata Type, so you can update the values easily and as needed and not have them hardcoded in the button. Just a thought. Good luck!