You need to sign in to do that
Don't have an account?
rani
Getting Newly Created Opportunity Id
Hi All,
I have created a new opportunity. After creating i have tried to retrive the new Opportunity Id by the following way, but is saying that it is undefined.
var saveResult = sforceClient.create([Opportunity]);
for (var i=-;i<saveResult.length;i++) {
if (saveResult[i].success == true) {
alert("Yay!! I created a record and the Id of the new record is: " + saveResult[i].Id);
} else {
alert("Rats! There was a problem and I think the problem is: " + saveResult[i].errors[0].message);
}
}
the saveResults[i].Id is not giving the newly created opportunity id. Can someone tell me how to get newly created opportunity id.
Any kind of help is appreciated.
Rani
gsickal
Id is case sensitive, your code should be saveResults[i].id, not saveResults[i].Id
rani
Thanks gsickal, it worked...Thanks a lot