Salesforce Fact #409 | Avoid inconsistency during picklist field update

We know that dependency on the values can the defined between picklists. This is ensured while we are creating or updating records from the UI.

But do you know while creating/updating records from API or data load picklist values can be inconsistent if both the controlling and dependent picklist values are not specified.

In this example, we have two picklist fields on Account: Picklist1 & Picklist2. Picklist1 has two values: valueA, valueB and Picklist2 has three values: value1, value2, value3. The dependency set up is like this: valueA-> value1, value2, value3 & valueB->None.

Now when updating records from the UI, whenever we select valueB, the dependent value sets to None. However, if we update the record from back end specifying only controlling picklist value, only that gets updated & the dependent one remains the same leading to inconsistency. So we should be careful while updating picklists having dependency.

Attached are the screenshots.







Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow