You need to sign in to do that
Don't have an account?
Paula Jarvis 4
Contact Validation Rule for Country, Record Type and Profile
I need to write a Mailing Address validation rule that only allows two profiles to edit/create a particular record type as well as notifying the User to spell out the Country. I have resorted to two validation rules as follows however I was hoping I could combine them. Any thoughts experts?
AND(
!OR(
$Profile.Name = "Custom Data Integrity Officer",
$Profile.Name = "System Administrator"),
OR(
MailingCountry = 'U.S.',
MailingCountry = 'US',
MailingCountry = 'USA',
MailingCountry = 'U.S.A.',
MailingCountry = 'United States of America'
))
Second VR:
Contact Validation Rule ~ Salesforce - Enterprise EditionAND(
!OR(
$Profile.Name = "Custom Data Integrity Officer",
$Profile.Name = "System Administrator"),
OR(
ISBLANK( MailingStreet ),
ISBLANK( MailingCity ),
ISBLANK( MailingState ),
ISBLANK( MailingPostalCode ),
ISBLANK( MailingCountry ),
$RecordType.Name = "Customer Contact"
))
AND(
!OR(
$Profile.Name = "Custom Data Integrity Officer",
$Profile.Name = "System Administrator"),
OR(
MailingCountry = 'U.S.',
MailingCountry = 'US',
MailingCountry = 'USA',
MailingCountry = 'U.S.A.',
MailingCountry = 'United States of America'
))
Second VR:
Contact Validation Rule ~ Salesforce - Enterprise EditionAND(
!OR(
$Profile.Name = "Custom Data Integrity Officer",
$Profile.Name = "System Administrator"),
OR(
ISBLANK( MailingStreet ),
ISBLANK( MailingCity ),
ISBLANK( MailingState ),
ISBLANK( MailingPostalCode ),
ISBLANK( MailingCountry ),
$RecordType.Name = "Customer Contact"
))
Contact Validation Rule ~ Salesforce - Enterprise EditionAND(
!OR(
$Profile.Name = "Custom Data Integrity Officer",
$Profile.Name = "System Administrator"),
OR(
ISBLANK( MailingStreet ),
ISBLANK( MailingCity ),
ISBLANK( MailingState ),
ISBLANK( MailingPostalCode ),
ISBLANK( MailingCountry ),
AND(
OR(
MailingCountry = 'U.S.',
MailingCountry = 'US',
MailingCountry = 'USA',
MailingCountry = 'U.S.A.',
MailingCountry = 'United States of America'
),
$RecordType.Name = "Customer Contact"
)))
All Answers
You can this:
Please do let me know if it helps you.
Regards,
Mahesh
Here is the combined VR.
Contact Validation Rule ~ Salesforce - Enterprise EditionAND(
!OR(
$Profile.Name = "Custom Data Integrity Officer",
$Profile.Name = "System Administrator"),
OR(
ISBLANK( MailingStreet ),
ISBLANK( MailingCity ),
ISBLANK( MailingState ),
ISBLANK( MailingPostalCode ),
ISBLANK( MailingCountry ),
AND(
OR(
MailingCountry = 'U.S.',
MailingCountry = 'US',
MailingCountry = 'USA',
MailingCountry = 'U.S.A.',
MailingCountry = 'United States of America'
),
$RecordType.Name = "Customer Contact"
)))