You need to sign in to do that
Don't have an account?
soma
Some values not being maintained during upsert
I'm not sure if this is an upsert issue or if I am simply not setting a variable to a proper value, but after a successful upsert, the checkbox field does not appear to be checked if I set it to true. I have an object "Object__c" which has a checkbox field "Checkbox__c" and an ID field "Id", and I set the checkbox in the following way:
Object__c myObj = new Object__c[1];
if (somethingIsTrue)
myObj[0].Checkbox__c = true;
else
myObj[0].Checkbox__c = false;
Then I upsert:
if (sfdc.upsert("Id", myObj)[0].success)
// yay!
This is all pretty standard, so I don't know why the checkbox isn't checked if set to true, but I'm wondering if I should be setting it to the literal string "true" or the numerical value 1 instead of the boolean value "true". Any ideas?
Object__c myObj = new Object__c[1];
if (somethingIsTrue)
myObj[0].Checkbox__c = true;
else
myObj[0].Checkbox__c = false;
Then I upsert:
if (sfdc.upsert("Id", myObj)[0].success)
// yay!
This is all pretty standard, so I don't know why the checkbox isn't checked if set to true, but I'm wondering if I should be setting it to the literal string "true" or the numerical value 1 instead of the boolean value "true". Any ideas?
myObj[0].Checkbox__c = true;
myObj[0].Checkbox__cSpecified = true;
Can you point me to the documentation that discusses this? I've been through documentation several times looking for something that discussed the "Specified" flag and I never found it.
Message Edited by soma on 11-13-2007 03:45 PM
You won't find it in the salesforce.com API docs, because its nothing to do with us, its a "feature" of the .NET SOAP Stack, you'll need to trawl the .NET docs.