Skip to main content
Felix Boening (Cloud Monsters GmbH) 님이 #Formulas에 질문했습니다

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개
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    2023년 3월 21일 오전 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