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
Karim BAHAJIKarim BAHAJI 

Validation rule on Account's Billing Address and specific profiles

Hi,

I create a validation rule on Account object related to the address field, the formula works, but i need to add a new criteria : this validation rule must work only on profiles name that contains "Emea".
 
OR( 
ISBLANK( BillingStreet ), 
ISBLANK( BillingPostalCode ), 
ISBLANK( BillingCity ), 
ISBLANK( BillingCountry ) 
)

Could someone help me please?

Thanks

 
Best Answer chosen by Karim BAHAJI
Amit Chaudhary 8Amit Chaudhary 8
Please try below validation rule.
AND(

 CONTAINS($Profile.Name, 'emea'),
	OR( 
	ISBLANK( BillingStreet ), 
	ISBLANK( BillingPostalCode ), 
	ISBLANK( BillingCity ), 
	ISBLANK( BillingCountry ) 
	)

)

Here

CONTAINS($Profile.Name, 'emea')

This will check whether the current logged in user's profile name contains emea or not.

Also Please look into the below links:

https://help.salesforce.com/htviewhelpdoc?err=1&id=customize_functions_a_h.htm&siteLang=en_US

https://help.salesforce.com/HTViewHelpDoc?id=customize_functions_i_z.htm&language=en_US

Please do let me know if it helps you.
Please let us know if this will help you


Thanks
Amit Chaudhary
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please try below validation rule.
AND(

 CONTAINS($Profile.Name, 'emea'),
	OR( 
	ISBLANK( BillingStreet ), 
	ISBLANK( BillingPostalCode ), 
	ISBLANK( BillingCity ), 
	ISBLANK( BillingCountry ) 
	)

)

Here

CONTAINS($Profile.Name, 'emea')

This will check whether the current logged in user's profile name contains emea or not.

Also Please look into the below links:

https://help.salesforce.com/htviewhelpdoc?err=1&id=customize_functions_a_h.htm&siteLang=en_US

https://help.salesforce.com/HTViewHelpDoc?id=customize_functions_i_z.htm&language=en_US

Please do let me know if it helps you.
Please let us know if this will help you


Thanks
Amit Chaudhary
 
This was selected as the best answer
Karim BAHAJIKarim BAHAJI
Thanks a lot Amit.