• gregp
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I am working on another validation rule.  While no syntax errors appear I am still able to change the stage of the opportunity to Close Won without the required fields. 

 

In essence what I would like is for the following fields to be required when the opportunity stage equals Close Won.  I provided the field name in red.

1.    Primary Activity must be completed (this is a picklist value) Activity_c

2.    NAICS Code must be completed (this is a look up field) NAICS_Code_c

3.    # of Jobs must be completed (this is a number field) of_Jobs_c

4.    Amount of investment must be completed (this is a currency field) Amount

5.    The Account Name cannot be CONFIDENTAL (this is a look up text field) Account.Name

 

Currently I have the following validation rule active.  No syntax errors appear however, I don’t get the results I need.  I have omitted the investment and account name from this validation rule because when I include them I get errors.  It is as if it does not want to accept the field type in my validation rule.  Can someone please provide assistance?  I cant seem to understand what I am doing wrong here.

 

AND(
ISPICKVAL(StageName, "Close Won"),
OR(
ISPICKVAL( Activity__c , ""),
of_Jobs__c < 0,
LEN( NAICS_Code__c ) = 0
))

  • August 18, 2008
  • Like
  • 0