function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ddotddot 

Help with Shipping Address Validation Rule

Hi group, 

Trying to get some help on a validation rule that has me stuck. What I'm trying to do is only allow an update to the Shipping Address, but only limited to three different profiles, and if a certain value is in the pick list. The code below is what I have so far.

AND(
OR(
ISCHANGED(ShippingStreet),
ISCHANGED(ShippingCity),
ISCHANGED(ShippingState),
ISCHANGED(ShippingPostalCode),
ISCHANGED(ShippingCountry),
OR(
NOT(ISPICKVAL( Hierarchy, "Value")),
$Profile.Name <> "ProfileA",
$Profile.Name <> "ProfileB",
$Profile.Name <> "ProfileC"
)))
Best Answer chosen by ddot
VinayVinay (Salesforce Developers) 
Hi,

Try below snippet.
AND(
OR(
ISCHANGED(ShippingStreet),
ISCHANGED(ShippingCity),
ISCHANGED(ShippingState),
ISCHANGED(ShippingPostalCode),
ISCHANGED(ShippingCountry)),
NOT(OR(
$Profile.Name = "ProfileA",
$Profile.Name = "ProfileB",
$Profile.Name = "ProfileC",
,ISPICKVAL(Hierarchy__c, "Value"))))

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi,

Try below snippet.
AND(
OR(
ISCHANGED(ShippingStreet),
ISCHANGED(ShippingCity),
ISCHANGED(ShippingState),
ISCHANGED(ShippingPostalCode),
ISCHANGED(ShippingCountry)),
NOT(OR(
$Profile.Name = "ProfileA",
$Profile.Name = "ProfileB",
$Profile.Name = "ProfileC",
,ISPICKVAL(Hierarchy__c, "Value"))))

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
This was selected as the best answer
viswanath reddy 53viswanath reddy 53
Hi ddot,
It looks like our team of experts can help you resolve this ticket.
We have Salesforce global help-desk support and you can log a case and our Customer Success Agents will help you solve this issue. You can also speak to them on live chat. Click on the below link to contact our help-desk. Trust me it is a support service that we are offering for free!

https://jbshelpdesk.secure.force.com

Thanks,
Jarvis SFDC team
ddotddot
Vinay, Thank you I feel that I tried this, but I'm happy I reacted out to the forum for an answer.