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
Salesforce AdminSalesforce Admin 

.NET SOAP integration

Hi

I have .NET SOAP integration.
When I add a new field to Salesforce of data type other than type text, the field is not included in the SOAP request to Salesforce.
So if I add a new field a__c of type text, after updating the wsdl in the .NET project I am able to set the value for this field in .NET which then updates Salesforce.
But if a new field of type number or checkbox is created in Salesforce, even after updating the wsdl in .NET the field value is not updated in Salesforce. In the debugging I can see that the new field is not part of the SOAP request to Salesforce.

Any ideas what could be causing the issue?

Thanks heaps.
Brian LangeBrian Lange
When performing the update using the API are you setting the cSpecified field to true?  I believe this lets the API know that you are trying to update the field.

Example:
MyCustomObject obj = new MyCustomObject();
obj.Custom_Field__c = "Foo";
obj.Custom_Field__cSpecified = true;
sForceService.update(new sObject[] { obj });

 
Brian LangeBrian Lange
You can also create your own WebServices and handle the updates in Apex instead.  This allows you to be a little more explicit with your code.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_web_services_methods.htm