1

I'm unable to figure out on how to add "NOT(ISNEW)" and "AND" to my validation rule which is

OR( OR( Auditee__r.VanaHCM__User__c  <>  $User.Id ,  
        Auditee_2__r.VanaHCM__User__c  <> $User.Id), 
        ISCHANGED( Audit_Closure_Target_Date__c ) , 
        ISCHANGED( RCA__c ) , 
        ISCHANGED( Proposed_Correction_Corrective_Actions__c )
      )

as I need to fire this rule only in a record already created but this rule of mine fires even before i create a record and save it.

1

You could try a few things:

NOT(ISNEW())

Or:

DATEVALUE(CreatedDate) <> Today()

Or:

CreatedDate <> NOW()
2
  • I actually want is to incorporate both NOT(ISNEW()) and AND in my formula such that it checks only the second time not during when the record is being created. – Nemesis88 Nov 8 '15 at 12:09
  • With NOT(ISNEW()) it will never execute the rule when the record is created... if you want to use it with something else then you'll need to do: AND( NOT(ISNEW()), XXXWhatever Else you need to valiedateXXX ) If that's not it then can you clarify a little more... as I don't quite get what you want or need :) – Tim Nov 8 '15 at 12:36
0

This is the answer to my question which I figured at long last on my own. Thank u @Timothy

AND( NOT( ISNEW()), 
     ISCHANGED( Audit_Closure_Target_Date__c ) , 
     ISCHANGED( RCA__c ) , 
     ISCHANGED( Proposed_Correction_Corrective_Actions__c),
     OR( Auditee__r.VanaHCM__User__c <> $User.Id , 
         Auditee_2__r.VanaHCM__User__c <> $User.Id)
   )
1
  • See how much easier it is to read this code now that I've formatted it? It's also much easier to detect errors if you neaten it up like this. – Caspar Harmer Apr 10 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.