• Robert T
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 2
    Replies
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
 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")} 
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) {
if(a==true){
alert('success message');

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



 

Hi! I'm looking for some info about "Batchable instance is too big" exception and I couldn't find nothing... Anyone have a clue about why this exception is triggered?

 

Thanks a lot! 

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
 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")} 
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) {
if(a==true){
alert('success message');

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