function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael Sabel 9Michael Sabel 9 

Need to add to Formula in Process Builder (create a separate validation rule?) so user must select a "Preferred Phone" if f they have 2 or more phone numbers on Conctact record?

Hi,

I am using the below formulas in Process Builder.

Salesforce automatically updates "Preferred Phone" picklist depending on which phone number field has a number in it.  So, if the MobilePhone is populated it updates the Preferred phone with Mobile.  If the HomePhone is populated it updates the Preferred phone with Home.  If the WorkPhone is populated it update the Preferred Phone with Work. 

1. Detect Change in Phone Field: Criteria Formula
OR(AND(ISNEW(),OR(NOT(ISBLANK([Contact].HomePhone)), NOT(ISBLANK([Contact].MobilePhone)), NOT(ISBLANK([Contact].npe01__WorkPhone__c)))), 
        ISCHANGED([Contact].HomePhone),
        ISCHANGED([Contact].MobilePhone),
        ISCHANGED([Contact].npe01__WorkPhone__c))

2.  Set Preferred Phone Field: Immediate Action
CASE(
    IF(ISBLANK([Contact].MobilePhone), '0', '1') +
    IF(ISBLANK([Contact].HomePhone),       '0', '1') +
    IF(ISBLANK([Contact].npe01__WorkPhone__c), '0', '1'),
    '100', 'Mobile',
    '010', 'Home',
    '001', 'Work',
NULL
)

This works great. The problem I now need to resolved is that if two or more phones are populated the user is required to select which is the Preferred Phone.

Thanks.
jordy molierejordy moliere
Hello Michael

Why do you not add a new picklist field required with the name «Preferered Phone» and you add the 3 values on it.
Then when the picklist value «mobile phone» is selected, you add the this condition on the process builder as a new criteria.

Please tell me if it help you :)