Skip to main content

Hi Everyone, i am trying to configure a validation rule, which prevents users from adding leads to active & inactive campaigns. At the Moment the Rule is configured like this:

 

(ISNEW()

 &&

((Campaign.IsActive)||

 

NOT(Campaign.IsActive)))

 

 ||  (ISCHANGED(CampaignId)

 

 &&

 

((Campaign.IsActive)

 

|| 

 

NOT(Campaign.IsActive)))

 

With this Error Condition Formula i am also not able to add contacts to campaigns, but this should be possible. Any Ideads how to prevent only leads to be added? 

 

1 respuesta
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    21 mar 2023, 10:59

    Hi Felix,

     

    Why do you bother with IsActive and NOT(IsActive)? No need for it if it's in the same condition as there can only be those 2 states.

    Also, here you're basically just saying to throw an error everytime.

    Just go with this:

    NOT(ISBLANK(LeadId))

    Also, please, for the future, use a code block when adding a formula just liek I did above:

     

    Hi Felix, Why do you bother with IsActive and NOT(IsActive)? No need for it if it's in the same condition as there can only be those 2 states.

0/9000