You need to sign in to do that
Don't have an account?
Bryan Paldino
Custom Accept Button
Hi Everyone,
I am trying to create my own custom Accept button. Must of the JavaScript code is working, but I can not figure out how to identify what record is selected in the Queue. Has anyone done this?
Here's the code that I have so far.
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
try{
var changeRequestToUpdate = new sforce.SObject("Underwriting__c");
changeRequestToUpdate.Id = "{!Underwriting__c.Id}";
changeRequestToUpdate.OwnerId = "{!$User.Id}";
changeRequestToUpdate.Status__c = "In Progress";
var result = sforce.connection.update([changeRequestToUpdate]);
if(result[0].success == "true"){
location.reload();
}
else{
alert(
"An Error has Occurred. Error: " +
result[0].errors.message
);
}
}
catch(e){
alert(
"An Error has Occurred. Error: " +
e
);
}
Thanks
I am trying to create my own custom Accept button. Must of the JavaScript code is working, but I can not figure out how to identify what record is selected in the Queue. Has anyone done this?
Here's the code that I have so far.
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
try{
var changeRequestToUpdate = new sforce.SObject("Underwriting__c");
changeRequestToUpdate.Id = "{!Underwriting__c.Id}";
changeRequestToUpdate.OwnerId = "{!$User.Id}";
changeRequestToUpdate.Status__c = "In Progress";
var result = sforce.connection.update([changeRequestToUpdate]);
if(result[0].success == "true"){
location.reload();
}
else{
alert(
"An Error has Occurred. Error: " +
result[0].errors.message
);
}
}
catch(e){
alert(
"An Error has Occurred. Error: " +
e
);
}
Thanks
Angelina Muddamalle
the following link might be useful: https://salesforce.stackexchange.com/questions/167037/accept-button-on-lead-detail-page