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 opportunity amount formula

Hi,

I need to create a validation rule on Opportunities with those criterias :
The error message must appear when a user with a profile that contains "emea" do not fill in the "Amount field" when the opportunity stage is on "negociation or Closed Won or Closed lost".

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'),
    ISBLANK( Amount )  ,
    or(  ISPICKVAL( StageName , 'negociation') ,
         ISPICKVAL( StageName , 'Closed Won'),
         ISPICKVAL( StageName , 'Closed lost')
    )
)
Please let us know if this will help u

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please try below validation rule
AND
(
   CONTAINS($Profile.Name, 'emea'),
    ISBLANK( Amount )  ,
    or(  ISPICKVAL( StageName , 'negociation') ,
         ISPICKVAL( StageName , 'Closed Won'),
         ISPICKVAL( StageName , 'Closed lost')
    )
)
Please let us know if this will help u
This was selected as the best answer
Mahesh DMahesh D
Hi Karim,

Here is the Validation Rule.
 

 
If you want to check Profile Name:
 
AND(CONTAINS($Profile.Name, 'emea'), ISBLANK(Amount), 
OR(ISPICKVAL(StageName 
, 'negociation'), ISPICKVAL(StageName, 'Closed Won'), ISPICKVAL(StageName, 'Closed lost')))

Here

CONTAINS($Profile.Name, 'emea')

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

ISBLANK(Amount)

This will check whether the Amount is blank or not.

ISPICKVAL(StageName , 'negociation')

This will check whether the stage name is negociation 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.

Regards,
Mahesh

 
Karim BAHAJIKarim BAHAJI
Thanks a lot
Karim BAHAJIKarim BAHAJI
Thanks Amit & Mahesh your formulas are good.