You need to sign in to do that
Don't have an account?
Ajay L
CPU timeouts with validation rule
Hello,
Can anyone help me on this validation rule causing CPU timeouts. When load the data through dataloader this validation is causing the CPU time out error, if I deactivate this rule and the load is success with no CPU timouts. I tried multiple times and noticed the same results. Is there a betterway we can write this validation rule?
AND (
OR($Profile.Name <> "API Integration", $Profile.Name <> "USA Sales Planning Rep",$Profile.Name <> "USA Sales Planning Executive",$Profile.Name <> "USA Sales Planning Mgr",$Profile.Name <> "API Eloqua" ),
OR(
ISBLANK( BillingCity ),
ISBLANK( BillingStreet ),
ISBLANK( BillingCountry),
ISBLANK( BillingState),
ISBLANK( BillingPostalCode )
)
)
Can anyone help me on this validation rule causing CPU timeouts. When load the data through dataloader this validation is causing the CPU time out error, if I deactivate this rule and the load is success with no CPU timouts. I tried multiple times and noticed the same results. Is there a betterway we can write this validation rule?
AND (
OR($Profile.Name <> "API Integration", $Profile.Name <> "USA Sales Planning Rep",$Profile.Name <> "USA Sales Planning Executive",$Profile.Name <> "USA Sales Planning Mgr",$Profile.Name <> "API Eloqua" ),
OR(
ISBLANK( BillingCity ),
ISBLANK( BillingStreet ),
ISBLANK( BillingCountry),
ISBLANK( BillingState),
ISBLANK( BillingPostalCode )
)
)
AND (
NOT(REGEX($Profile.Name ,"API Integration|USA Sales Planning Rep|USA Sales Planning Executive|USA Sales Planning Mgr|API Eloqua" )),
OR(
ISBLANK( BillingCity ),
ISBLANK( BillingStreet ),
ISBLANK( BillingCountry),
ISBLANK( BillingState),
ISBLANK( BillingPostalCode )
)
)
All Answers
AND (
REGEX($Profile.Name ,"API Integration | USA Sales Planning Rep | USA Sales Planning Executive | USA Sales Planning Mgr | API Eloqua" ),
OR(
ISBLANK( BillingCity ),
ISBLANK( BillingStreet ),
ISBLANK( BillingCountry),
ISBLANK( BillingState),
ISBLANK( BillingPostalCode )
)
)
Thanks for your reply, however validation rule is not firing for other profiles:(
Any suggestions please?
Regards,
Ajay
AND (
REGEX($Profile.Name ,"API Integration|USA Sales Planning Rep|USA Sales Planning Executive|USA Sales Planning Mgr|API Eloqua" ),
OR(
ISBLANK( BillingCity ),
ISBLANK( BillingStreet ),
ISBLANK( BillingCountry),
ISBLANK( BillingState),
ISBLANK( BillingPostalCode )
)
)
I did the changes as you suggested above. Being a sys admin user, I should get the error if I create or edit the record without Billing address. For some reason the validation is not firing.
Am I doing anything wrong?
Regards,
Ajay
AND (
NOT(REGEX($Profile.Name ,"API Integration|USA Sales Planning Rep|USA Sales Planning Executive|USA Sales Planning Mgr|API Eloqua" )),
OR(
ISBLANK( BillingCity ),
ISBLANK( BillingStreet ),
ISBLANK( BillingCountry),
ISBLANK( BillingState),
ISBLANK( BillingPostalCode )
)
)
It actually improved the performance.
Reagrds,
Ajay