You need to sign in to do that
Don't have an account?
S_Batman
Leads email domain in custom field
I want to create a custom field that parses the domain of an email and inserts it in there through a trigger. Could someone help me create that trigger please?
i.e. if Leads email is jonsmith@abc.com then custom field = abc.com
i.e. if Leads email is jonsmith@abc.com then custom field = abc.com
You can do this declaratively with a formula field:
Hope that helps
All Answers
You can do this declaratively with a formula field:
Hope that helps
So I want a custom field on the Account level that again fills with the contact's email domain.
You can do this with a process. The formula for the field update would be
1. Create a process on contact
2. Criteria :
3. Action: Update Records > Account ID
4. [Your email domain field] FORMULA and insert the formula above.
Hope that helps!
I am following your steps, and on step 3 when I select Account ID I am getting the following error
However, the email domain field on my Account level is not populating.
The email domain field on the Account level I created as a text field and inserted the formula you mentioned in the process builder.
My accounts have multiple contacts, but it does not matter which Contacts email domain it uses as they all have the same email domain.
Just to make sure I did it correctly, here are my steps
- Object = Contact, start process when a record is created/edited
- Criteria for Executing Actions = Formular evaluates to true & formula is
ISCHANGED([Contact].Email)
&&
NOT(ISBLANK([Contact].Email))
- if True = Actiona Name = Update Record
Record = [Contact].Account ID
- Criteria for Updating Records = No Criteria - just update the records
- Set new field values for the records you update
Field = Email Domain
Type = Formula
Formula = IF(NOT(ISBLANK([Contact].Email)),RIGHT([Contact].Email,LEN([Contact].Email)-FIND('@',[Contact].Email)),null)
Thanks a lot for your help!