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
scampscamp 

populate sObject Dynamically

All,
 
I have several tables to update (including some Custom Objects) from SQL. An xml document is used to specify the tables and fields to be updated (to avoid having to recompile every time someone asks for an additional field). The data is extracted from SQL into a DataTable in my vb code, so the values are also known.
 
Is it possible to specify the fields and values to populate an sObject with dynamically? Is there another method i'm missing for creating/updating records in SFDC that allows the use of field/value pairs?
 
Steven : )
SuperfellSuperfell
Take a look at the partner API.
scampscamp

Simon,

Thanks for the response. Are you recommending the Sforce Provider as an integration solution or do I have the wrong component?

Steven : )

SuperfellSuperfell
The Partner WSDL / API, goto setup -> integrate -> AppExchange API and download the Partner WSDL instead of the Enterprise WSDL. This gives you a more loosely typed programming model, which is much easier to use for these dynamic mapping scenarios (its what the Sforce Data Loader uses for example).
scampscamp

Simon,

A light bulb is now glowing dimly over my head. If I understand you correctly, the Partner wsdl will allow me access to my Enterprise Data by using less structured methods (like field/value pairs)...

Steven : )

SuperfellSuperfell
bingo
scampscamp

Simon,

The light glows much brighter now. It appears the Partner wsdl provides a rich environment to manipulate SFDC data dynamically. Everything I needed was demonstrated in the Sample.vb application or at least enough of a hint was provided to get coding.

There will be an extra ten in your paycheck this week. Thanks for the help!

Steven : )