Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object to display warning msg if value is selected

FaisalPatel1
Contributor III

Can anyone help me with custom object code that will display a warning message when a particular value in a value list is selected .

 

Eg. if Risk Rating = "High" or "Very High" and Risk status = "closed" then display warning message .

 

Thanks in Advance

6 REPLIES 6

PaulDouglas
Archer Employee
Archer Employee

It might be easiest to have a custom object which just contains the error that you are wanting to show that is hidden by default in the layout. Then use a conditional layout DDE to show the field when Risk Rating contains "High" "Very High" and Risk Status = "Closed"

FaisalPatel1
Contributor III

Dear Paul,

 

We don't want to set the field as closed.

 

When the user selects closed there should be a warning message that "you have closed the risk when the rating is High or Medium or Low".

PaulDouglas
Archer Employee
Archer Employee

Then I would use a Filter Values List DDE that doesn't allow for Closed to be selected if value is High or Very High.

Also, you could use Advanced Workflow to move a record through the process, and set the Status to read-only. Then only a specific person can click the button that closes a risk.

Ilya_Khen
Champion III

Might be useful, just need to change some code for warning instead of setting value.

Clear out text field based on value list options. Kudos for Geoff Taylor and David Petty

PaulDouglas
Archer Employee
Archer Employee

Keep in mind that the three options I've put forward use out-of-the-box functionality. If you go the custom code route, you'll need to manage and maintain yourself.

I prefer using DDEs to show/hide or filter the list, then AWF processes, and absolute last for this requirement is custom object. It will survive version updates and is much easier to maintain for the admins. If your values change, or edge cases appear, you won't have to code your way out of trouble.

Thank you all. That was quite helpful.