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
SquashcookieSquashcookie 

workflow rule to update a picklist based on custom setting

Hi guys

 

I'm trying to automatically update a 'Risk' field based on which 'Industry' a user selects.

eg.  Construction = High Risk,  Administration = Low Risk

When a user selects 'Construction', 'High Risk' is automatically selected (and protected)

 

I can achieve this with a basic CASE formula, however I'm hoping there is a more elegant and scalable way of doing this.

If I was designing this with a database, I'd have a separate table with one column for Industry and one for Risk, the use this to look up which value to use.

 

Looking at the Custom Settings feature, I'm hoping this may be able to help.

Has anyone been able to achieve this?

Also, is there a way to synchronise the values in the Industry field as well as the Custom Setting? 

ie. if there is a new Industry, is there a way to ensure both the Industry field and the Custom Setting is updated?

 

thanks

Best Answer chosen by Admin (Salesforce Developers) 
Starz26Starz26

Make the risk field a picklist

 

then create a dependency between the picklists. Once the other field is set the Risk is automatically populated if the dependency is for one value. (Only works in the UI though, Bulk updates will have to explicitly enter the value)

All Answers

Starz26Starz26

Make the risk field a picklist

 

then create a dependency between the picklists. Once the other field is set the Risk is automatically populated if the dependency is for one value. (Only works in the UI though, Bulk updates will have to explicitly enter the value)

This was selected as the best answer
SquashcookieSquashcookie

This is a very simple solution.

Thanks.

 

Just for my curiousity, is there a way to do it like I've proposed?

As pointed out, this only works in the UI, so bulk uploads will need a workflow rule (or trigger) to update.