Formulas and Validations | Create Validation Rules | Trailhead/Salesforce
Вставка
- Опубліковано 6 жов 2024
- Formulas and Validations | Create Validation Rules | Trailhead/Salesforce
Trailmix 2 - Customize Salesforce with Clicks
Create a Validation Rule
Rule Name: Contact_must_be_in_Account_ZIP_Code
Operator: AND (return true if both conditions are true)
Define the two conditions that, combined, will show the error message:
The contact is associated with an account id
The contact mailing zip code is different than the account shipping zip code
Hint: Use the API names (MailingPostalCode and Account.ShippingPostalCode) and the (Not Equal) operator.
Enter an error message for the validation rule
This is the formula that I am using :
AND(
NOT(ISBLANK(AccountId)),
MailingPostalCode != Account.ShippingPostalCode
)
#salesforceadmin
#salesforceadmin
#salesforcedeveloper
#trailhead
#salesforcetrailhead
Disclaimer -
This Video for education purposes
Error: Field MailingPostalCode does not exist. Check spelling. what i do ?
This is the formula I use
You also use this formula:
and (
NO(ISBLANK(AccountID)),
MailingPostalCode != Account.ShippingPostalCode
)