본문 바로가기
Salesforce/Tips

Scenarios of Salesforce Validation Rules (1)

by 들숨날숨흡 2024. 8. 19.
728x90

(1) Validate that the phone number begins with the country code, which is represented by the plus sign(+).

LEFT(Phone, 1) <> "+"

 

(2) Validates if a custom discoun tpercenetage field falls within the range of 0 to 40%.

OR(Discount_Rate__c < 0, Discount_Rate__c > 0.40)

 

(3) Validates that the Account Number is numeric if not blank.

OR (ISBLANK(AccountNumber),NOT(ISNUMBER(AccountNumber)))

 

(4) Make the required field for the Object generation.

AND( ISBLANK(Email), ISBLANK(Phone))

728x90