Hi,
If I receive an email from a contact which has 3 email id's in my crm. How do we know what's the email id used in that email.
*This post is locked for comments
Hi,
If I receive an email from a contact which has 3 email id's in my crm. How do we know what's the email id used in that email.
*This post is locked for comments
if (entity.LogicalName == "email")
{
if (entity.Contains("directioncode"))
{
if (((Boolean)entity["directioncode"]) == false)
{
EntityCollection M = ((EntityCollection)entity.Attributes["from"]);
string subject = ((string)entity.Attributes["subject"]);
}
}
}
Create a Query in your plugin code (on the receive message of the email) to query the email address on the Contact entity with multiple conditions
WHERE fromAddress = emailAddress1 OR fromAddress = emailAddress2 OR fromAddress = emailAddress3.
Hi Ravi,
you could try with a plugin, intercepting the create message of the email:
...
EntityCollection partycoll = email.GetAttributeValue<EntityCollection>("from"); if (partycoll != null) { foreach(Entity party from particoll.Entities.ToList()) { string emailaddress = party.GetAttributeValue<string>("addressused"); } }
...
Please, let us know.
NB: before to implement the plugin you can try do it throught a console application, after retrieving an email record
If you found the answer helpful, please mark as Verified
Thank You & Best Regards
Francesco Picchi
Microsoft Dynamics CRM Consultant, Bologna, ITALY
Independent Contractor
1 contact with 3-email id. e.g. ravi.kashyap@gmail.com
ravi.kashyap@live.com
ravi.kashyap@in.com
if
You mean 3 contacts with the same email address, or 1 contact with 3 email addresses?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156