0
AND(
     OR (ISCHANGED([AccountContactRelation].IsActive ), 
             ISCHANGED([AccountContactRelation].EndDate ),
             ISCHANGED([AccountContactRelation].Roles )
     ),
     [AccountContactRelation].IsActive = true
)

We currently have a process builder with the above condition which basically gets invoked when any of "IsActive" or "EndDate" or "Roles" fields are changed. Roles field contains 3 values(say Manager, Customer, Partner)

I want to modify the condition in such a way that it gets invoked only for 2 roles, say for Manager and Customer but not Partner.

In Apex it is easy to exclude a specific role. But in Process builder condition, I am not sure how Partner role can be excluded. I tried below which didnt work. Any pointers on this is highly appreciated.

AND(
     OR (ISCHANGED([AccountContactRelation].IsActive ), 
             ISCHANGED([AccountContactRelation].EndDate ),
             ISCHANGED([AccountContactRelation].Roles )
     ),
     If( ISCHANGED([AccountContactRelation].Roles), 
         OR( 
                INCLUDES([AccountContactRelation].Roles , 'Manager'),
                INCLUDES([AccountContactRelation].Roles , 'Customer')           
            ),
            false
     ),
     [AccountContactRelation].IsActive = true        
)

1 Answer 1

0

Your current logic works for changing Roles only. Any other case will give you FALSE because second condition in AND - ISCHANGED([AccountContactRelation].Roles) == FALSE

please try

AND(
  [AccountContactRelation].IsActive = true,
  OR(
    ISCHANGED([AccountContactRelation].IsActive ),
    ISCHANGED([AccountContactRelation].EndDate ),

    AND( ISCHANGED([AccountContactRelation].Roles),  OR( 

            INCLUDES([AccountContactRelation].Roles , 'Manager'),
            INCLUDES([AccountContactRelation].Roles , 'Customer')           

    )) 
  )          
)

Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .