Answered by:
find associated account based on domain of email sender

Question
-
I have a workflow that will link an incoming email to a contact based on the email sender's email address - working fine!
Is there any way that I can link an incoming email to a CRM contact or account based on the domain of the sender's email address.
e.g. all incoming emails from [anyperson]@greenpark.com would be associated with the account "Greenpark Trading Company" even if all the relevant full email addresses are not defined.
TIA
JoeTuesday, September 6, 2011 8:59 PM
Answers
-
Hi,
You can use the following plugin code mentioned in Url (http://worldofdynamics.blogspot.com/2011/08/dynamics-crm-2011-execute-custom.html) the code check for incomming email and detect if the email is from the exsisting account, you can search for the incomming email address domain in the contact email address field and can search for the account via RetrieveMultiple (http://mileyja.blogspot.com/2011/03/crm-2011-retrievemultiple-calls-in.html) request by email domain or assosiated contact and then can set the regarding field to the particular account.
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".- Proposed as answer by Jehanzeb.Javeed Saturday, September 10, 2011 6:22 PM
- Marked as answer by Joe Kelly Saturday, September 10, 2011 9:12 PM
Saturday, September 10, 2011 6:21 PM
All replies
-
You can certainly create a custom workflow activity to do this. There are no OOB workflow activities for string comparison!
Ayaz Ahmad CRM Solutions Architect | http://ayazahmad.wordpress.com- Proposed as answer by Ayaz.AhmadModerator Wednesday, September 7, 2011 3:33 AM
- Marked as answer by Ayaz.AhmadModerator Saturday, September 10, 2011 4:13 PM
- Unmarked as answer by Joe Kelly Saturday, September 10, 2011 9:03 PM
- Unproposed as answer by Joe Kelly Saturday, September 10, 2011 9:04 PM
Tuesday, September 6, 2011 11:30 PMModerator -
Thanks Ayaz
Does anybody have any code examples?
TIA
JoeWednesday, September 7, 2011 9:17 PM -
Hi,
You can use the following plugin code mentioned in Url (http://worldofdynamics.blogspot.com/2011/08/dynamics-crm-2011-execute-custom.html) the code check for incomming email and detect if the email is from the exsisting account, you can search for the incomming email address domain in the contact email address field and can search for the account via RetrieveMultiple (http://mileyja.blogspot.com/2011/03/crm-2011-retrievemultiple-calls-in.html) request by email domain or assosiated contact and then can set the regarding field to the particular account.
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".- Proposed as answer by Jehanzeb.Javeed Saturday, September 10, 2011 6:22 PM
- Marked as answer by Joe Kelly Saturday, September 10, 2011 9:12 PM
Saturday, September 10, 2011 6:21 PM -
Great - thanks
JoeSaturday, September 10, 2011 9:13 PM