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
Phil WitzmannPhil Witzmann 

Required Fields

Hi,

I would like to improve my fields in my leads layout, but I'm having problems in doing something.

By default, at the moment you can't change email and phone.

Is it possible to create a formula or validation rule that if I have the email but not the phone I can change the phone, and if I have the phone but not the email I can change the email?

Thank you
pconpcon
You could create a validation rule that would fire if the following formula evaluates
 
NOT(
   AND(
        NOT(ISNEW()),
        OR(
            AND(
                ISCHANGED(Phone),
                ISBLANK(PRIORVALUE(Phone)),
                NOT(ISCHANGED(Email)),
                NOT(ISBLANK(PRIORVALUE(Email)))
            ),
            AND(
                ISCHANGED(Email),
                ISBLANK(PRIORVALUE(Email)),
                NOT(ISCHANGED(Phone)),
                NOT(ISBLANK(PRIORVALUE(Phone)))
            )
        )
    )
)

This works for the little bit of testing I did but I would make sure to test it a bunch before pushing it to production