Do you have video on the other way to do this, that is using Permission Set's and Custom Permission it is an even better way because is deployable. What do you think?
For this functionality why would we make a custom setting, we can simply write the condition in validation rule Condition Formula, something like "when profile not equal to system admin". This will only fire the rule when profile is not system admin. Similarly we can add users in the code I guess.
Yes, but this scenarios bypass from custom settings as per the logged in user/profile, since custom settings created as "Hierarchy" based, so thats means we no need to specify the profile name/user name into your validation rule and this automatically take care if you mention custom settings details into your validation rule. FYI - Custom settings contain two types (1. List & 2. Hierarchy)
Using the custom setting is far more scalable. Let's say multiple profiles and individual users all need different combinations of bypassing validation. In this scenario it's 1 line to reference the custom setting vs many to hard code user ids, etc. Secondly, you can change the behavior of multiple validation rules without having to go and edit those rules. Let's say a user moves into a role where they can bypass all opportunity validation rules-- you'd just add a row in the custom setting for them. Custom settings use the most specific row matching the user. Lastly, you could extend this functionality other places, like workflow rule, process builder, flow, or even apex triggers, using settings to turn them on or off or modify their behavior.
THANK-YOU!!! It was a really helpful video but it would have been better with audio
Thank you
Do you have video on the other way to do this, that is using Permission Set's and Custom Permission it is an even better way because is deployable. What do you think?
how?
How to use list custome settings in validation rules/application?
For this functionality why would we make a custom setting, we can simply write the condition in validation rule Condition Formula, something like "when profile not equal to system admin". This will only fire the rule when profile is not system admin. Similarly we can add users in the code I guess.
Yes, but this scenarios bypass from custom settings as per the logged in user/profile, since custom settings created as "Hierarchy" based, so thats means we no need to specify the profile name/user name into your validation rule and this automatically take care if you mention custom settings details into your validation rule.
FYI - Custom settings contain two types (1. List & 2. Hierarchy)
Using the custom setting is far more scalable. Let's say multiple profiles and individual users all need different combinations of bypassing validation. In this scenario it's 1 line to reference the custom setting vs many to hard code user ids, etc.
Secondly, you can change the behavior of multiple validation rules without having to go and edit those rules. Let's say a user moves into a role where they can bypass all opportunity validation rules-- you'd just add a row in the custom setting for them. Custom settings use the most specific row matching the user.
Lastly, you could extend this functionality other places, like workflow rule, process builder, flow, or even apex triggers, using settings to turn them on or off or modify their behavior.
@@funklion how to do it for the automation tools and triggers.
@@prashantmohadikar7310 same, flow, formula, validation, apex can all referent custom settings
gunga hai kya?