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
dereksfdereksf 

Salesforce API update checkbox field

I am trying to use an asp.net webform to create a lead in salesforce using the API. Although the lead is created I can't get the checkbox field to be "checked".

 

I am using a radio button where the values are either True/False or 1/0. I even tried to hardcode the value as a boolean value, but still it does not update. It just remains unchecked.

 

Any help would be great.

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

If you're using the enterprise WSDL, remember to set the speficied flag to true, otherwise .NET doesn't send that element, e.g.

 

lead.someField = true;

lead.someFieldSpecified = true;

 

 

All Answers

SuperfellSuperfell

If you're using the enterprise WSDL, remember to set the speficied flag to true, otherwise .NET doesn't send that element, e.g.

 

lead.someField = true;

lead.someFieldSpecified = true;

 

 

This was selected as the best answer
dereksfdereksf

Thanks SimonF, that was it!