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
Dhaval PanchalDhaval Panchal 

Urgent::Salesforce Integration with .net

Hi,

 

How many different ways to integrate .net with salesforce?

 

I tried using enterprice.wsdl. I was able to connect with salesforce but there are some problems using enterprise.wsdl

1. we need to get enterprise.wsdl if we need to use this code with other environment (i.e. if we have used sandbox during development and then we need to use that code with production)

2. every time we need to get latest enterprice.wsdl if we make changes to salesforce metadata.

 

I want to make it dynamic like java. I have integrated salesforce with java and it was dynamic (using parner.wsdl). But I donot have idea for .net.

 

Any one provide me sample code?

Best Answer chosen by Dhaval Panchal
SuperfellSuperfell

in java, those functions are specially provided by WSC, in .NET you get an XmlElement [] any property on sobject that you need to populate. You can write a simular wrapper to the java one if you want to.

 

http://www.salesforce.com/us/developer/docs/api/Content/sample_create_call.htm#topic-title has a sample of populating the any property.

All Answers

SuperfellSuperfell

You can use the partner WSDL from .NET.

Dhaval PanchalDhaval Panchal

Hi,

 

In java I have used dynamic record creation using below code:

 

SObject obj = new SObject();
obj.setType("Account");
obj.setField("Name", "Test Account");
obj.setField("Phone", "XXXXXXX");
obj.setField("ParentId", ParentId);

I have used partner.wsdl in java.

 

Now I want to do same thing in C#.net. I have added partner.wsdl in .net. It works fine.But I am not able to do same thing as above. Sobject have not properties like above.

 

Do you have any idea how to implement same in .net?

SuperfellSuperfell

in java, those functions are specially provided by WSC, in .NET you get an XmlElement [] any property on sobject that you need to populate. You can write a simular wrapper to the java one if you want to.

 

http://www.salesforce.com/us/developer/docs/api/Content/sample_create_call.htm#topic-title has a sample of populating the any property.

This was selected as the best answer
Dhaval PanchalDhaval Panchal
Thanks Simon,

This will be very useful to me.