You need to sign in to do that
Don't have an account?
Arpi Jakab 8
newSObject(recordTypeId, loadDefaults) ignores 'loadDefault = false'
Hi, I have a custom object that has a series of default fields. When I create a new SObject and insert it, all the default field values are assigned.
Repro:
1. Create a custom Object with a custom field of type 'checkbox' that is set to 'checked' by default
2. Create an instance of this object using [Custom Object Name].newSObject(null, false);
3. Insert the newly created object
4. [select Checkbox__c from CustomObject]
5. Notice that checkbox is set to 'true'.
This is not limited to checkboxes, all field types have this problem, picklists, text, etc...
Repro:
1. Create a custom Object with a custom field of type 'checkbox' that is set to 'checked' by default
2. Create an instance of this object using [Custom Object Name].newSObject(null, false);
3. Insert the newly created object
4. [select Checkbox__c from CustomObject]
5. Notice that checkbox is set to 'true'.
This is not limited to checkboxes, all field types have this problem, picklists, text, etc...