You need to sign in to do that
Don't have an account?
Unable to update Oppty Amount field using Enterprise wsdl
I downloaded the Enterprise WSDL from SF and consuming it in .Net application.
I am trying to update an Opportunity Name & Amount.
What I have observed is,
When the initial opp Amount value is blank, when .net app is run, only Opp Name gets updated., Amount field is still blank.
When the initial opp Amount value is not blank, when .net app is run, both Opp Name & Amount fields gets updated.
I would like to know, why the amount is not getting updated when the old value is blank.
I am not able to find any documentation for the same.
Am I missing anything?
Code:
Opportunity opp = (Opportunity)queryResults.records[0];
Console.WriteLine("Name: " + opp.Name + " - Stage :" + opp.StageName + " - Amount : " + opp.Amount);
opp.Name = "Oppty_Name_Test13"; // old value - "OppTest13" -> gets changed to new value when run
opp.Amount = 12345.00; // old value blank -> no change, still shows blank after run
SaveResult[] saveResults = binding.update(new sObject[] { opp });
because your not setting the amountSpecified flag to true, see the sticky post at the top of this forum.
All Answers
because your not setting the amountSpecified flag to true, see the sticky post at the top of this forum.
Thanks a lot Simon!! That did work.