+ Start a Discussion
RAM AnisettiRAM Anisetti 

Alternative to on click JavaScript Button in Lightning Experience

Hi Experts,
We have a Custom Button(on click JavaScript Button) on Lead and sending lead information to third party through executing custom soap webservice class .Depends on the result ,we are showing sucess message.
But Lightning Experience is not supported onclick JavaScript Buttons.
Can any one guide us best approach to execute the same functionality in lighting.

My sample click JavaScript Button code is
Var a;

accnt.Id = '{!Lead.Id}';
var r = confirm("you sure want to send it ?");
if(r == true)
a = sforce.apex.execute("sendLeadInfo_service", "sendInfo", {
ids: "{!Lead.Id}",
Type: 'Lead'
}, {
onSuccess: refreshList,
onFailure: handleError

var refreshList = function(a) {
alert('success message');

var handleError = function() {
alert('Oops! Something went wrong. ');

Robert TRobert T
I have the same question.