views:

30

answers:

1

(I assume anyone out there using SalesForce web services from c# has also seen this. If there's a way around this - obviously I'd rather know that.)

Whenever I set, say, the value of a field on a wsdl.exe generated web service like this:

campaignStat.Clicks__c = ToDouble(Stat.clicks);
campaignStat.Clicks__cSpecified = true;

Can anyone think of a way to not have to worry about forgetting to set that boolean? I don't care if it's a hack.

A: 

According to http://stackoverflow.com/questions/1680356/wcf-service-proxy-not-setting-fieldspecified-property the answer is "So basically - that's the way it is, get used to it :-)"

As long as the web service that You are calling have optional parameters, this is how it is. You can hack around by altering the proxy code that VS generated, but Your changes will be lost next time You regenerate the proxy.

Andreas Paulsson