function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
hguhgu 

dynamic update fields

 

I am trying to do a dynameic update of Contact object, so I can pass any new value by calling one method only. Is there any way to do this?

public bool UpdateContact(Contact oldcontact, string updateFieldName, string newValue)

{

Contact updateContact = new Contact();

updateContact.Id = contact.ContactId;

//What I would like to do

/*   updateContact.updateFieldName = newValue;  */

SaveResult[] sr = binding.update(new sObject[] {updateContact});

//return true or false;

}

SuperfellSuperfell
This is trivial with the partner WSDL.