Inserting Bulk Picklist Values of Object FieldLabel and FieldAPI

Inserting Bulk Picklist Values of Object FieldLabel and FieldAPI

This approach is achieved using tooling api and workbench. If you want to remove then its ok as well. If you just want to update or create picklist field then you will have to follow below steps.

Step 1: Begin by querying for the object’s fields and FieldAPI. Once done, export the results to an Excel sheet.

Step 2: Access Workbench. Navigate to: Utilities > REST Explorer.

Step 3: Opt for the ‘Get’ method. You’ll see an URL space where you need to input: /services/data/v41.0/tooling/sobjects/CustomField/00N6t00000A57NK. Make sure to replace this ID with that of your specific picklist field.

Step 4: After executing, locate and click on the ‘Show JSON’ hyperlink. Proceed to copy the JSON content and save it elsewhere.

Step 5: Head back to the Excel sheet from the first step. Enhance your sheet by adding the following columns: color, default, description, isActive, label, urls, and valueName.

Step 6: Transform your enhanced Excel data into JSON format. Use this online tool: Excel to JSON Generator. Paste your Excel information, then copy the generated JSON.

Step 7: Return to Workbench and select: Utilities > REST Explorer. This time, choose the ‘PATCH’ method. Again, insert the following URL: /services/data/v41.0/tooling/sobjects/CustomField/00N6t00000A57NK. Don’t forget to adjust the ID to match your picklist field.

Step 8: Finally, in the request body section, paste the JSON data you’ve copied. Upon hitting ‘Execute’, the system will efficiently create all the desired picklist values.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top