Current User Id check in Salesforce Validation Rule
$User.Id can be used in Salesforce Validation Rules for the current running user ID. Sample Validation Rule: AND( ISNEW(), $User.Id != Account.OwnerId ) Output: https://youtu.be/Kbl5dSznLSo
$User.Id can be used in Salesforce Validation Rules for the current running user ID. Sample Validation Rule: AND( ISNEW(), $User.Id != Account.OwnerId ) Output: https://youtu.be/Kbl5dSznLSo
Validation Rule can be used to avoid update to Case record when the Status is Working. Validation Rule Formula: AND( ISPICKVAL( Status, 'Working' ), ISPICKVAL( PRIORVALUE( Status ), 'Working' ), ....
Custom Permission can be checked in Validation Rule. Use $Permission.Custom_Permission_Name in the Validation Rule to check. If the User have Custom Permission via profile or permission set, then it will ....
Sample Validation Rule: AND( Is_Active__c, NOT( ISCHANGED( Is_Active__c ) ), NOT(ISNEW()) ) Output:
Sample Case Queue: Validation Rule: Output:
Formula: NOT( REGEX( FIELD , "[a-zA-Z]*" ) ) Sample Validation Rule:
VALUE() method converts text to a number. So, we can easily use it to check whether Text field value is less than or equal to zero. Check the below example.
Validation Rule: AND( IF( IsNew(), true, IF( PRIORVALUE( IsClosed ), ISCHANGED( CloseDate ) , false ) ), MONTH( CloseDate ) != MONTH( TODAY() ), IsClosed )
1. Create a custom field on the Account. 2. Create a Workflow Rule on the Opportunity Object. 3. Create a Field Update on Opportunity Object. 4. Create a Validation Rule ....
Regular Expression(RegEx) can be used for multiple Emails separated by coma validation rule in Salesforce. Syntax: OR( NOT( REGEX( Emails__c , "([a-zA-Z0-9._-]+@[a-zA-Z]+.[a-zA-Z,]{2,4})*" ) ), RIGHT( Emails__c , 1 ) = ....