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
Scott TrickScott Trick 

SOAP API Sample Code Question for Merge()

I'm looking at the c# code for SOAP API Merge() located here:

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_merge.htm?q=merge

The problem i'm having is figuring out how to get this to work in c# because I dont have an 'Account' type.  How do I create the Account? :

// Create two accounts to merge
Account[] accounts = new Account[2];

 
InzamamulInzamamul (Salesforce Developers) 
Hello Scott,

I would recomment you to please go through the below link:

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm

You don't create new Account objects in your C# code to perform a merge; you work with existing records by querying them and then specifying which records you want to merge using their IDs.

Please mark this as the best answer if this helps.

Thank You.
Scott TrickScott Trick
As it turns out the problem was that I was using the partner wsdl and should have been using enterprise wsdl.