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
arjuna Rajput 29arjuna Rajput 29 

Create Triggered flows and trigger on Contact

see question is
-Whenever we create new contact we entered email feild suppose arj@cyno.com.
-When we check after creating contact when we see details of contact that we create account name field already fill name cyno.
-in this we extract  doamin name from email and  account field already or automatic fill with name cyno......

-Please answer me using Trigger (trigger design pattern) and triggered flows
Vivek   9Vivek 9

Hi Arjuna

I would extract the domain name from the email using the function String.split('@') and after that check if there are any accounts present with the domain. If there is an account present then I would fill the field on the contact with the account id .

All the above mentioned procedure should be put in the trigger IsBefore and IsInsert.

arjuna Rajput 29arjuna Rajput 29
Will you write whole trigger for this and make flows take screentshot of each step and send here
Plese will you do this
Archie Archie3265Archie Archie3265
Thank you so much for sharing the solution. I was unable to extract the domain name from the email of  bags for female lawyers (https://besttravelpurse.com/best-work-bags-for-female-lawyers/). But after reading this thread now I can easily extract domain from any email easily. Thank you once again for sharing such of valuable and brief knowledge.