In classic, I have a Custom button for DocuSign which looks like this. I want to convert this to lightning.
{!REQUIRESCRIPT("/apex/dsfs__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 = '15f9eee9-e8d4-49c0-805e-73184eac7581';
//********* 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;
I have created a button component and added to Oppty layout. What is the way to execute following URL code since URL is different for lightning and the following URL is a classic? as well as include javascript?
Lightning Component controller
({
doInit : function (component, event) {
var action = component.get("c.returnFlag1");
action.setParams({
"opptyId": component.get("v.recordId")
});
action.setCallback(this,function (a){
var stat = a.getReturnValue();
if (stat) {
window.open('/'+component.get("v.recordId"));
}else{
alert('Please check criteria');
}
});
$A.enqueueAction(action);
}
})
force:navigateToSObject
event.force:navigateToURL
event. As you could see on the left panel of the documentation.