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
ColoradoMikeColoradoMike 

Suggestion for creating a record that has a dependent picklist?

I'm using the API to create a record in a custom object.  The record has a dependent picklist that has a controlling field that is a checkbox field.

The dependent picklist has two choices, one of which is marked as "Default".  If the checkbox field is not checked, neither of the choices is available.

The problem is that when I create a new record, even if I don't specify a value for the picklist field, it always is set to the default value, even though the controlling field (the checkbox field) isn't checked.

Have I missed something obvious? Shouldn't there be a way to create a record with the API that conforms to the rules that are applied by the user interface?