locked
In Outlook 2010 Set "Regarding" to parent customer RRS feed

  • Question

  • I am using Outlook 2010 and MS CRM 2011 with the outlook plugin installed.

    When I track an email in the inbox it always sets the Regarding to None.

    But if the CRM contact which has sent the mail has a parent customer, is it not possible let the CRM plugin set the default value of Regarding to this customer?

     

    Friday, August 26, 2011 12:50 PM

Answers

  • Hi,

    In plugin on Email entity Create message Pre-Operation Stage you can register a plugin that can check if the email direction is incoming and has been sent from the Contact then find contact parent customer and change the regarding value. You may also refer the following blog post for further information: http://worldofdynamics.blogspot.com/2011/08/dynamics-crm-2011-execute-custom.html (the blog post check if sender is customer then it fetch customer details) 


    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 Friday, August 26, 2011 1:01 PM
    • Marked as answer by ofero Monday, August 29, 2011 1:52 AM
    Friday, August 26, 2011 1:01 PM
  • Hi,

    there is no out-of-the-box way that supports your scenario. I believe you have a two options to come close to what you want to realize without any extra effort (like development):

    1. Instead of clicking on the "Track in CRM" button, immediately click "Set Regarding" and choose the regarding manually yourself. After setting the regarding it is also tracked automatically in CRM. I assume you don't want to use this one because you probably don't know the contacts parent customer by heart. As a go between solution you could make sure that the parent customer field can somehow be used in the quick find of contact.  
    2. If it is not a requirement to explicitly set the regarding to the account, you might be interested to know that by default emails from the contact linked to an account will also appear in the (closed) activities view on the account form. Of course when you change the account of the contact, the email will appear under the activities of that new account (as the mail is linked to the contact and the contact to the account - no direct link between account and mail)

    If you really want to set the regarding to the account, I was first thinking about a workflow that automatically runs on the create of an email activity. This workflow should then update the regarding with the parent account of the contact (From). Unfortunately the Regarding field cannot be dynamically set to the the from or a related field of from in the workflow designer (because the types of these fields).
    A solution could be to develop a custom workflow activiy that extracts the required info out of the from and returns it as an output parameter usable for a regarding field. However, keep in mind that the workflow will always runs asynchronously, so the user will not immediately see the updated information. Also, workflow does not run until you are online, so the update will not happen when you are in offline mode in crm for Outlook.

    Another programmable option is to develop and deploy a Dynamics CRM plugin that runs on the create of email activity and sets the regarding field to the parent customer of the contact (from). This can also run synchronously (immediately) and even offline (assuming that all required data is available offline).

    Hope this is somewhat helpful.
    Good luck,

    Wim

    • Proposed as answer by Jim Glass Jr Friday, August 26, 2011 3:12 PM
    • Marked as answer by ofero Monday, August 29, 2011 1:52 AM
    Friday, August 26, 2011 1:35 PM

All replies

  • Hi,

    In plugin on Email entity Create message Pre-Operation Stage you can register a plugin that can check if the email direction is incoming and has been sent from the Contact then find contact parent customer and change the regarding value. You may also refer the following blog post for further information: http://worldofdynamics.blogspot.com/2011/08/dynamics-crm-2011-execute-custom.html (the blog post check if sender is customer then it fetch customer details) 


    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 Friday, August 26, 2011 1:01 PM
    • Marked as answer by ofero Monday, August 29, 2011 1:52 AM
    Friday, August 26, 2011 1:01 PM
  • Hi,

    there is no out-of-the-box way that supports your scenario. I believe you have a two options to come close to what you want to realize without any extra effort (like development):

    1. Instead of clicking on the "Track in CRM" button, immediately click "Set Regarding" and choose the regarding manually yourself. After setting the regarding it is also tracked automatically in CRM. I assume you don't want to use this one because you probably don't know the contacts parent customer by heart. As a go between solution you could make sure that the parent customer field can somehow be used in the quick find of contact.  
    2. If it is not a requirement to explicitly set the regarding to the account, you might be interested to know that by default emails from the contact linked to an account will also appear in the (closed) activities view on the account form. Of course when you change the account of the contact, the email will appear under the activities of that new account (as the mail is linked to the contact and the contact to the account - no direct link between account and mail)

    If you really want to set the regarding to the account, I was first thinking about a workflow that automatically runs on the create of an email activity. This workflow should then update the regarding with the parent account of the contact (From). Unfortunately the Regarding field cannot be dynamically set to the the from or a related field of from in the workflow designer (because the types of these fields).
    A solution could be to develop a custom workflow activiy that extracts the required info out of the from and returns it as an output parameter usable for a regarding field. However, keep in mind that the workflow will always runs asynchronously, so the user will not immediately see the updated information. Also, workflow does not run until you are online, so the update will not happen when you are in offline mode in crm for Outlook.

    Another programmable option is to develop and deploy a Dynamics CRM plugin that runs on the create of email activity and sets the regarding field to the parent customer of the contact (from). This can also run synchronously (immediately) and even offline (assuming that all required data is available offline).

    Hope this is somewhat helpful.
    Good luck,

    Wim

    • Proposed as answer by Jim Glass Jr Friday, August 26, 2011 3:12 PM
    • Marked as answer by ofero Monday, August 29, 2011 1:52 AM
    Friday, August 26, 2011 1:35 PM