You need to sign in to do that
Don't have an account?

Validation rules for Shipping address fields on Account + Using a User ID Override
Hello
I have created validation rules for each of the Shipping Address fileds in SFDC except for the Country field. The purpose for these rules are to prevent users from creating accounts with blank addresses. In addition to the simple validation rules I am trying to incorporate an override to where If UserID = 'UserID1','UserID2','UserID' Then skip validation.
I have had no success doing this, the main purpose is to load/edit accounts in SFDC from the dataloader where the accounts do not have all address fields filled out or if an Admin wants to modify an account that does not have all of the Shipping Address filled out.
Has anyone done something similar if so can you share your validation rule code?
Thank you all for your help!
It would be best to set this based on the Profile Name of the currently logged in user (or user loading via Data Loader) versus specific IDs if at all possible. Here's sample of how this would look for both a Profile Name and a list of User IDs:
Profile Validation
AND(OR(LEN( ShippingStreet)=0, LEN( ShippingCity)=0, LEN( ShippingState)=0, LEN(ShippingPostalCode)=0), $Profile.Name <> "System Administrator")
List of User IDs
AND(OR(LEN( ShippingStreet )=0, LEN( ShippingCity)=0, LEN( ShippingState)=0, LEN(ShippingPostalCode)=0), AND($User.Id <> "00550000000aaBB", $User.Id <> "00550000000aaCC", $User.Id <>"00550000000aaDD"))
I updated my post to remove Country
All Answers
It would be best to set this based on the Profile Name of the currently logged in user (or user loading via Data Loader) versus specific IDs if at all possible. Here's sample of how this would look for both a Profile Name and a list of User IDs:
Profile Validation
AND(OR(LEN( ShippingStreet)=0, LEN( ShippingCity)=0, LEN( ShippingState)=0, LEN(ShippingPostalCode)=0), $Profile.Name <> "System Administrator")
List of User IDs
AND(OR(LEN( ShippingStreet )=0, LEN( ShippingCity)=0, LEN( ShippingState)=0, LEN(ShippingPostalCode)=0), AND($User.Id <> "00550000000aaBB", $User.Id <> "00550000000aaCC", $User.Id <>"00550000000aaDD"))
I updated my post to remove Country
Thank you very much Mark! This helps a ton!
Regards,
Vineet