The following Articles covers an issue that arises when a Picklist Value is added but the Admin User forgot to apply the Picklist Value to all Record Types for the object. When adding to global Picklist Value Sets, be sure to always check this box.
In the example below the Error message appeared on the Time Blocks object when trying to create a Time Block and the error references the Product Categories field.
The error reads:
An error occurred while saving Time Blocks
Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: Baths: [i360core__Product_Categories__c]
To resolve this error the System Administrator user will need to locate the Record Type and Edit the Picklist Values Available for each Record Type on each Object where that global Picklist Value Set is used.
In this Example there are two Objects which use Record Type AND the Product Categories picklist value set field. Those two (2) objects are: Sale and Time Blocks.
Resolution Steps
Login as the Admin User
Go to the Setup menu
Go to the Object Manager menu
Choose the Object where this error is occurring, in this example it is the Time Block object.
Note: The Product Categories Picklist Value Set is used on a variety of Objects within the system. You will only need to be concerned with manually setting the field values Objects which use more than one Record Type.
Choose Record Types, then click on the Record Type which was giving the error message. Note: we recommend checking ALL Record Types for the object.
In the Picklists Available for Editing section, click Edit next to the Product Categories field.
In the Available Values, move over ALL Product Categories to the Selected Values column by using the Add button.
Then click Save.
Continue to Edit the next Record Type.
Move ALL Product Category values into the Selected column by using the Add button, and click Save.
Next you'll want to check the Record Types for the Sale object.
Go back to the Object Manager menu
This time select the Sale object
Then choose Record Types and select the Canceled Sale record type.
In the Picklists Available for Editing section, click Edit next to the Product Categories field.
In the Available Values, move over ALL Product Categories to the Selected Values column by using the Add button.
Then click Save.
Continue to Edit the next Record Type.
Prevention - how to keep this from happening in the future
When the System Administrator User is adding to ANY Picklist Value Sets in the system, be sure to check the checkbox "Add the new picklist values to all Record Types that use this Global Value Set."
Follow along with these steps:
Go to Picklist Value Sets
Choose the field you need to add values to, in this example, the Product Categories field.
Click the New button to create more values.
Type each Value on a different line. Be sure to check the checkbox: Add the new picklist values to all Record Types that use this Global Value Set
This checkbox will prevent you from needing to add the Value to every Object Record Type.
Helpful Tip: If you need to know everywhere a Picklist Value Set is being used, scroll down on the Picklist Value Sets record and you'll see a section labeled "Fields Where Used" which displays every Object Field which utilizes this global Picklist Value Set. Note that in some places the Field Label is Interested In, other places it is labeled Product Categories and on the Staff object it's labeled for each Department's Capabilities. All these fields reference the same global Picklist Value Set.
Comments
0 comments
Article is closed for comments.