You need to sign in to do that
Don't have an account?
Custom Button Onclick JavaScript - updated related object
Hi,
I have a Task related to a Case. When I set a given Status on the Task, I would like to set a certain flag on the related Case.
JavaScript Onclick is working well for me to update Task fields; can anyone help me update the related Case ?
example :
{!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")}var task = {!GETRECORDIDS( $ObjectType.Task )};task.Status = 'CS Decision expected';
// FIXME, please :
// case = task.Case; // get related Case
// case.Flag__c = 'CS Decision requested by plant'; // update flag on Case
// sforce.connection.update(case);
var result = sforce.connection.update(task);if (result[0].getBoolean("success"){ window.location.reload();}else{ alert("Error");
}
Hi,
did you find a solution to this ??