0

I have a simple text custom field and I want to auto populate the value in it on basis of a lookup field value.
To be more precise, in case object when a user selects contact, I want to auto populate the email address of the contact in a separate field instantly and not on save.
I have seen this question many times but could not find a solution which can help me
I cannot use a formula field because it is not visible in edit section and this will confuse users.
Any solution without APEX involvement would really appreciated

1

A formula field does sound like the right item here, and I'm not sure I fully understand your concern about the users being confused. Do you want users to have the ability to "override" the autopopulated email from the contact by being able to edit the field?

If this is your use case, you could have a second field on the Contact that you could populate which could propagate to the formula field. If this local field is not populated, the formula field could default to the contact's email. Something like this:

IF(
    NOT(ISBLANK(Local_Email_Field__c)),
    Local_Email_Field__c,
    Contact_Lookup_Field__r.Email__c
)

If you don't have a use case for the override, I would simply train your users that the field won't appear on the edit layout and to not worry about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.