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 

Using Trigger Design Pattern

user fill contact field details in lightning..When user enter their email
abc@gmail.com.
after fill. we check after that we create contact the field email get xtracted
show account name fied automatically filled with gmail.means that gmail account is already in Account object
PriyaPriya (Salesforce Developers) 

Hey Arjuna,

The requirement is not clear. Can you please provide the requirement in detail.

Regards,

Priya Ranjan

arjuna Rajput 29arjuna Rajput 29
Hi Priya,
Actual query is below
Using Trigger Design Pattern

Extract domain from contact's email field.If any account of same
domain name exists.Link the contact to that account.
arjuna Rajput 29arjuna Rajput 29
Suppose Domain name matches to account..Then when ever we fill contact record speciall email part after filled it we see that account name is automatically filled with domain name
PriyaPriya (Salesforce Developers) 

Hey Arjuna,

You have to use the 'Split method' in the trigger. 
Refer this link to extract the domain name :- 
https://developer.salesforce.com/forums/?id=906F00000005JLDIA2

This exactly matches your requirement.

If you like this, kindly mark it as the best answer.

Regards,

Priya Ranjan