Skip to main content

Requirement:

When RecordType 1, Total must be greater than 0.  Exclude Profiles and User

 

OR

 

When RecordType2 and Field is 'Option', Total must be greater than 0.

Exclude Profiles and user.

 

Need Help on Validation Rule

Please let me know if this helps and if I can clarify more.

 

Thank You,

Daniel

2 件の回答
  1. Jenna Weiner (AgWest Farm Credit) Forum Ambassador
    2022年7月25日 19:59

    Something more like this might work better, if I'm understanding your use case: 

     

    AND(

    OR(

    AND (

    RecordType.Name ='RecordType1',

    Total__C <0

    ),

    AND (

    RecordType.Name ='RecordType2',

    ISPICKVAL(Field,"Option")

    Total__C <0

    )

    ),

    $User.LastName != "User",

    $Profile.Name!="Profile 1",

    $Profile.Name!="Profile 2

    )

    Note: I didn't test this in Salesforce - just typed it out. So you should probably double check all the commas and parenthesis. ;) 

     

    And regards the zero., I'm not sure if you mean that the total needs to be 0.01 or greater, or just not zero. Like are you wanting it to evaluate if it's a negative number? Or only if it's literally 0? Might need to adjust that part a bit.  

    I hope this helps. If it does, please mark this response as the 'best answer' to effectively close the thread and keep the community neat and tidy. And if you need additional help, just let us know! 

0/9000