You need to sign in to do that
Don't have an account?
jwing
How's the detail of a save result?
var save = ( sforceClient.update([opportunity]) )[0];
if (save.success == true) {
/*
....
*/
} else {
window.alert("Rats! There was a problem and I think the problem is: " + save.errors[0].message);
window.location.replace("/" + opportunityId);
}
Is save.errors.message all I can have? Due to the accessibility issue, I may need to know the error in detail, say the fields which are hidden to current user.
if (save.success == true) {
/*
....
*/
} else {
window.alert("Rats! There was a problem and I think the problem is: " + save.errors[0].message);
window.location.replace("/" + opportunityId);
}
Is save.errors.message all I can have? Due to the accessibility issue, I may need to know the error in detail, say the fields which are hidden to current user.
DevAngel
You should have all the error info that you need in the saveResult. Check the API documentation for more details about the structure of SaveResult.
Cheers