Skip to main content

Hello, 

 

We have a validation rule so that it is required to have either a phone, email or linkedIn profile as a requirement to save the contact. It works when you add a new contact from the contact tab, but when we try adding it from the organization it isn't popping up. 

 

Any idea what is going on and/or how to fix it? 

 

Thanks in advance. 

 

#Salesforce Admin  #Salesforce  #Data Management

11 respuestas
  1. Hoy, 5:56

    Hi @Rosie Lewis

     

    A few good leads came out of that thread here's the synthesis and what's actually likely going on: 

    The LEN vs ISBLANK swap doesn't matter here. For text fields, LEN(field) = 0 and ISBLANK(field) behave identically that's a red herring, not your bug. Also, the AND() logic is correct for what you want (block save only if every field is empty) that's not broken either. 

    The real cause is almost certainly one of these two, in order of likelihood: 

    1. A Screen Flow or Quick Action is creating the Contact via a path that bypasses validation. If "adding from the organization" (Account) uses a Screen Flow's Create Records element, Flow has a checkbox "Skip the validation rules" (formerly "Skip Salesforce validation rules for this record") that developers sometimes enable to avoid friction. If that's checked, the rule never fires for that path, even though it fires normally when a user saves via the standard Contact edit page. This matches your symptom exactly: same rule, same object, but silently doesn't fire from one specific creation path.
    2. A Quick Action ("New Contact" on the Account's Contacts related list) is pre-populating one of the seven fields, most commonly MailingStreet, via a "Predefined Field Value" on the action. If that field gets auto-filled from the Account's Billing Address, the AND() condition is no longer all-blank, so the rule correctly doesn't fire it's not being bypassed, it's legitimately satisfied by data the user didn't type in themselves.

    How to confirm which one, without guesswork:

     

     

    • Setup → Object Manager → Contact → Buttons, Links, and Actions check if "New Contact" on the Account page is a Quick Action, and if so, open it and check "Predefined Field Values."
    • Setup → Flows - search for any Screen Flow referencing Contact creation, triggered from the Account page (button, Lightning page component, or Flow action). Open its Create/Update Records element and check the "Skip Validation Rules" checkbox.
    • If it's Lightning, also check whether the "New Contact" button on Account is a Lightning App Builder-placed Flow component rather than the standard related-list New button - that changes where to look entirely.

    I hope you find the above information helpful. If it does, please mark it as Best Answer to help others too.

0/9000