locked
Make REGARDING field mandatory in CRM Outlook Client RRS feed

  • Question

  • In our CRM web application, the Regarding attribute is mandatory.

    Our users use CRM Outlook Client.

    Is there a way to make this field mandatory in Outlook ?

    Idealy, I would like to make this field mandatory when the "Track in CRM" button has been clicked.

    I cannot really used a plugin pre-create, because an error (out of my control) is raised after
    the Outlook activity is created, and the CRM create activity failed.

    Friday, August 28, 2009 7:04 PM

Answers

  • Hi Michel,

    Since the CRM Outlook Client using the Outlook forms, it's not possible to make it madatory in Outlook.  Even using Pre-Plugin, you can't really tell if that record is created from Outlook.  I came across this issue a while back.  

    If you figure out a solution, I like to hear that from you.  If anyone have other ways to accomplish this task, please share with all of us.

    Thanks!


    Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com
    Sunday, August 30, 2009 5:08 AM
    Moderator

All replies

  • Hi Michel,

    Since the CRM Outlook Client using the Outlook forms, it's not possible to make it madatory in Outlook.  Even using Pre-Plugin, you can't really tell if that record is created from Outlook.  I came across this issue a while back.  

    If you figure out a solution, I like to hear that from you.  If anyone have other ways to accomplish this task, please share with all of us.

    Thanks!


    Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com
    Sunday, August 30, 2009 5:08 AM
    Moderator
  • I can detect if the plugin was called by the CRM web application or Outlook
    using context.CallerOrigin.

    When an activity is created via Outlook I have:

    context.MessageName = Create
    context.CallerOrigin.ToString = Microsoft.Crm.Sdk.WebServiceApiOrigin

    When created directly from the CRM web application I have:

    context.MessageName = Create
    context.CallerOrigin.ToString = Microsoft.Crm.Sdk.ApplicationOrigin

    Then, even if I can detect if the plugin is called by Outlook or the application,
    when I raised an error (Throw New InvalidPluginExecutionException) in the plugin,
    it is not shown when the origin is Outlook. And in this case the message is always:

    "An error occurred promoting this item to Microsoft CRM. The Microsoft CRM Server could not be
    contacted or the user has insufficient permissions to perform this action.
    This item has been saved to Microsoft Outlook but is not being tracked in Microsoft CRM."

    And it does not matter if it is a pre-create or a post-create.

    If I was able to control this error message, I would call a pre-create and raise an error
    message like:

    "This item has been saved to Microsoft Outlook but is not being tracked in Microsoft CRM because REGARDING is missing".

    So at least I would control the CRM side.

    I guess also that some Outlook APIs (or Outlook Add-INs) should be available to altered the default behavior of Outlook.

    Michel

    Monday, August 31, 2009 3:41 PM