• Sorn1
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I have just started using SalesForce and am having trouble getting the update Account Sample to work.
 
 

//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

  • June 27, 2008
  • Like
  • 0
I have just started using SalesForce and am having trouble getting the update Account Sample to work.
 
 

//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

  • June 27, 2008
  • Like
  • 0