Salesforce Fact #466 | Don't add translation for custom labels used in VR

If we are using some custom label which is holding some string value and it is getting used in the validation rule, then we should not add any translation for that custom label otherwise the validation rule may break.

For example, we want the user to restrict saving an account when type has a particular value and that value is stored in the custom label so that it can configured as and when needed. Now, the validation rule is fine as long as there is no translation added. Once, we add the translation for a particular language and a user with that particular language tries to save an account with the same type, the validation rule is not fired since instead of the English text it takes the translated value of that particular language.

So, we need to be careful. Attached are the screenshots.






Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow