You need to sign in to do that
Don't have an account?
saariko.ax241
I tried both true or false , 0, 1 (which offcourse failed cause it's a boolean and not int field.
Setting a checkbox value - amazed
I am amazed on how difficult I find it to set a checkbox to it's value.
Using a simple x = true on a custom field (checkbox) on 1 custom object, and I get nothing correct.
code is c#
Code:private static void createLicense() { if (!loggedIn()) return; try { //Create an account object to send to the service sforce.OptiTex_License__c license = new sforce.OptiTex_License__c(); //Set several properties license.X1_Marker__c = true; license.X2_Grading__c = false; //license.X4_Light_version__c. // Add the account to an array of SObjects sforce.sObject[] records = new sforce.sObject[] { license }; // Invoke the create call, passing in the account properties // and saving the results in a SaveResult object sforce.SaveResult[] saveResults = binding.create(records); // Access the new ID String newID = saveResults[0].id; Console.WriteLine(newID.ToString()); } catch (Exception e) { Console.WriteLine(e.Message + "\n" + e.StackTrace); return; } }
I tried both true or false , 0, 1 (which offcourse failed cause it's a boolean and not int field.
any help is appreciated thanks.
license.foo__cSpecified = true;
I posted an idea on ideas website.
feel free to vote
http://ideas.salesforce.com/article/show/69651/NERF_the_foo_cSpecified__make_it_automatic
I also have a project on the backburner to provide an alternative to wsdl.exe which would generate this modified setter code.