You need to sign in to do that
Don't have an account?
Cross Object Validation rule
I'm trying to create a cross object validation rule that will prevent the creation of a "Case" with a given "Priority" dependent on a field on the Account record. This is what I have so far, but it doesn't prevent me from creating a Priority 1 case for a Non-Retainer account.
/* If account Retainer status is Non Retainer AND
Priority is Sev 1 or 2 - throw error */
AND(false,
ISPICKVAL(Account.Retainer_Status__c, 'Non-Retainer'),
OR( ISPICKVAL(Priority, '1. High-System Down'),
ISPICKVAL(Priority, '2. Medium-System Severely Impaired')
)
)
Any suggestions would be appreciated.
Thanks in advance!
-Gareth
Can I ask why did you put "false" in the error condition? It renders the other conditions obsolete.
Should I just delete "False"? So that it reads:
/* If account Retainer status is Non Retainer AND
Priority is Sev 1 or 2 - throw error */
AND(
ISPICKVAL(Account.Retainer_Status__c, 'Non-Retainer'),
OR( ISPICKVAL(Priority, '1. High-System Down'),
ISPICKVAL(Priority, '2. Medium-System Severely Impaired')
)
)
[cid:image001.jpg@01CEE582.BFC0DD00]
Gareth D. Hernandez
Business Analyst
SmartDog Services, LLC
504.585.7512 Office * 504.430.9612 Cell
800.328.1251 SmartDog Support
800.309.1213 Administrative Assistance
gdh@smartdogservices.com
www.smartdogservices.com
This email may be confidential, may be legally privileged, and is for the intended recipient only. Unauthorized access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited. Please delete if obtained in error and email confirmation to the sender.
Yes, I think that should work.
Also, if you want this rule to work for new cases only, add ISNEW() to your error conditions.
[cid:image001.jpg@01CEE583.D54B2030]
Gareth D. Hernandez
Business Analyst
SmartDog Services, LLC
504.585.7512 Office * 504.430.9612 Cell
800.328.1251 SmartDog Support
800.309.1213 Administrative Assistance
gdh@smartdogservices.com
www.smartdogservices.com
This email may be confidential, may be legally privileged, and is for the intended recipient only. Unauthorized access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited. Please delete if obtained in error and email confirmation to the sender.
Hi
Just remove false from the validation rule.
It will work as you desired.
AND(ISNEW(),
ISPICKVAL(Account.Retainer_Status__c, 'Non-Retainer'),
OR( ISPICKVAL(Priority, '1. High-System Down'),
ISPICKVAL(Priority, '2. Medium-System Severely Impaired')
)
)
-Gareth
[cid:image001.jpg@01CEE585.0EBD4860]
Gareth D. Hernandez
Business Analyst
SmartDog Services, LLC
504.585.7512 Office * 504.430.9612 Cell
800.328.1251 SmartDog Support
800.309.1213 Administrative Assistance
gdh@smartdogservices.com
www.smartdogservices.com
This email may be confidential, may be legally privileged, and is for the intended recipient only. Unauthorized access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited. Please delete if obtained in error and email confirmation to the sender.
Yes the validation rule work for customer portal also same like the regular application in sales force.