+ Start a Discussion
David_RDavid_R 

Dynamicall​y update custom object (c#)

I am working in c#, am relatively new to the Salesforce API's and am trying to update a custom object dynamically.  I assume there is some way to retrieve (or create) the object, get its fields collection and update via the collection, something like myOjbect.Fields("status__c) = "accepted".  It's necessary to write it in this way because I won't know the fields to update in advance and therefore can't refer to them explicitly, like myObject.status.  Any direction much appreciated.  (also posted this in .net forum)

AJSFDCAJSFDC

It can be achieved using describe calls. Below url helps

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_list_describe.htm

 

Cheers,

J

_Prasu__Prasu_
David, You can use the Partner WSDL, In which you can create a instance of SObject which takes the XMLElement array (fieldname, value) pair as one parameter, You can also refer to the sample code of using Partner WSDL..