+ Start a Discussion
john8407john8407 

Help with validation rule

Anyone see what's wrong with this? I can't figure out why it's not working.

 

OR(

AND( 
Opportunity.MagnysResubmitDeadline__c - NOW()<0, 
Sent_to_Magnys__c=TRUE, 
Resent_to_Magnys__c=FALSE, 
$Profile.Id<>"00e40000000wl5p" 
),

AND( 
Initial_Unit_Price__c <> 0.00, 
Sent_to_Magnys__c=TRUE, 
Resent_to_Magnys__c=FALSE, 
$Profile.Id<>"00e40000000wl5p" 
)

Steve :-/Steve :-/

Can you explain what you mean by "not working"?  Are you getting an error message?  If you are could you post it?  Are you just not getting the expected result?  If that's the case, could you explain what you're evaluating and the result you want and what you're getting?

john8407john8407

We had this before:

AND( 
Opportunity.MagnysResubmitDeadline__c - NOW()<0, 
Sent_to_Magnys__c=TRUE, 
Resent_to_Magnys__c=FALSE, 
$Profile.Id<>"00e40000000wl5p" 
)

 

I added the bottom section and the OR.  I want to be able to edit if the Initial Unit Price field is 0.  I have the Initial Unit Price as 0 but it's throwing the validation rule error message when it shouldnt.

 

 

shra1_devshra1_dev

Hi john,

 

have you given the other values,

 

Sent_to_Magnys__c = false and Resent_to_Magnys__c = true while editing the record

 

I hope the profile assigned to you is having id = 00e40000000wl5p.

 

Regards,

Shravan

Steve :-/Steve :-/

Try this:

 

AND(
OR( 
Opportunity.MagnysResubmitDeadline__c - NOW()<0,
Initial_Unit_Price__c <> 0.00),  
Sent_to_Magnys__c=TRUE, 
Resent_to_Magnys__c=FALSE, 
$Profile.Id<>"00e40000000wl5p")

 

 

Steve :-/Steve :-/

Are you all set or do you still need help with this?

Steve :-/Steve :-/

Are you all set with this or do you still need help?

Steve :-/Steve :-/

Are you all set with this or do you still need help?

Steve :-/Steve :-/

are you all set  or do you still need help with this?