Crm 2011 Outlook Outlook - install against required

Our client is using Microsoft Outlook CRM 2011 Outlook and they have a unique business need. They want to make "Set Regarding" mandatory for all their employees using Outlook to send emails (Weird huh?). If a user forgets to set when sending an email, a notification should be displayed regarding the appearance and should not allow the user to send an email.

I couldn't find any of them, so I decided to write addlook. Is there a way to tell the outlook addin ItemSend event that the mail item has the value set for the field? I can get the subject of the email including CRM: xxxxx, but since the email has not yet been created in CRM, I have no idea how to pull the relevant data.

+3


source to share


2 answers


Tracking information is stored in the mail's MAPI properties. See attached screenshot. They must be available in the ItemSend event.

You can get this information like this (from @Ahmeds comment)



dynamic regardingId = mailItem.PropertyAccessor.GetProperty("schemas.microsoft.com/mapi/string/‌​;{00020329-0000-0000-C000-000000000046}/crmRegardingId/0x0000001F");

      

enter image description here

+3


source


I used the following code in VS2012 and Outlook 2010 to get the corresponding GUID.



dynamic id = mailItem.UserProperties["crmRegardingId"]; 
if (id != null) Console.Write(id.Value); 
else Console.Write("Error");

      

0


source







All Articles