You need to sign in to do that
Don't have an account?
jwing
Can't get ID of newly created SObject
var opportunity = new Sforce.Dynabean("Opportunity");
opportunity.set(.....
.....
if (saveResult[0].success == true) {
output += "Opportunity has been created, ID is: " + saveResult[0].Id + ".";
document.getElementById("output").innerHTML = output;
}
But I got this eventually:
"Opportunity has been created, ID is: undenfined."
opportunity.set(.....
.....
if (saveResult[0].success == true) {
output += "Opportunity has been created, ID is: " + saveResult[0].Id + ".";
document.getElementById("output").innerHTML = output;
}
But I got this eventually:
"Opportunity has been created, ID is: undenfined."
saveResult[0].id <<<< __ note lowercase "i"
or saveResult[0].toString() to see all the fields
a good debugger will also show you the members of the saveResult object array
http://www.writely.com/View.aspx?docid=aknntgrrcfb_bcggcbnj6gz5b