You need to sign in to do that
Don't have an account?
Update Account Sample not working
//create the account object to hold our changes
sforce.sObject updateAccount = new sforce.sObject();
//need to have the id so that API knows which account to update
//set a new value for the name property
updateAccount.Id = "0016000000hkyAAN";
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
System.Xml.XmlElement nameElement = doc.Xml.XmlElement("Name");
nameElement.InnerText = "New Account Name from Update Sample";
updateAccount.Any = new System.Xml.XmlElement[] { nameElement };
updateAccount.type = "Account";
sforceP.SforceService binding = Utility.GetPartnerBinding (this.Context);
//call the update passing an array of object
sforce.SaveResult[] saveResults = binding.update(new sforceP.sObject[] { updateAccount });
System.Xml.XmlDocument doc does not have a member doc.Xml.XmlElement
Can somebody advise
many thanks
Can you tell me where you got the sample code? i'll get it updated.
Message Edited by SimonF on 06-27-2008 07:36 AM
The same sample can also be found at:
http://www.salesforce.com/us/developer/docs/sforce70/wwhelp/wwhimpl/common/html/wwhelp.htm?context=sforceAPI_WWHelp&file=sforce_API_partner_examples.html
Once again thankyou for your help
Roy
Error messages are:
XXXX.Enterprise.sObject' does not contain a definition for 'Any'.
XXXX.Enterprise.sObject' does not contain a definition for 'type'.
Thanks,
Thanks,