Skip to content

Configuring CRM 2011 Outlook System Filters

CRM 2011 Outlook System Filters

I was recently tasked with installing and testing the Microsoft Dynamics CRM 2011 codeplex solution “Views and Filters Toolkit” to our internal Microsoft Dynamics CRM Online system.  This codeplex solution can be especially useful in installations where there are many Outlook users using CRM through Outlook.  Outlook System Filters allows an administrator to control the synchronization Outlook filters from a central location.  I went to the codeplex site – https://crm2011ldgmanager.codeplex.com/ and downloaded the managed solution.  When I tried to install the solution, I received the error below:

 

I did some research and found the version that did import and publish successfully for Microsoft Dynamics CRM 2011 Online.  This version can be found at: https://practical-crm.blogspot.com/2013/03/views-and-filters-toolkit-for-crm-online.html.  The following custom workflow activities are now available in Workflows when you Add Step:

 

I also found the following website to be very helpful.  It has links to samples and walkthroughs of the custom workflow activities:   https://xrm2011.wordpress.com/category/views-toolkit/

I began testing the custom workflow activities.  I created a workflow with only one step (Reset User Filters) and was successful in resetting my Contact Outlook filter from “All Contacts” back to “My Contacts” (which is the system default). See below for Reset user Filters parameters.

 

However, I was not successful with the “Retrieve View” activity. “Retrieve View” is the first step in:

  • Deploying a Personal view to a user.
  • Duplicating a Personal view to s System view.
  • Deploying a system wide filter for Outlook users.
  • Deploying and Instantiating a filter for Outlook Users.

Below please find the error I am receiving. I look forward to hearing from anyone that can give any insight to this issue.

[Crm2011LdgManager: Gemina.CRM2011.WF.LdgManager.AgRetrieveView]
[LDG AG Utilities: Retrieve View]
Error Message:
Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.Runtime.Serialization.XmlObjectSerializerContext.DemandSerializationFormatterPermission()
   at WriteKeyValuePairOfstringanyTypeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
   at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at WriteAttributeCollectionToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
   at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at WriteEntityToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
   at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at Gemina.CRM2011.WF.LdgManager.AgCodeActivityBase.Serialize(Object obj)
   at Gemina.CRM2011.WF.LdgManager.AgRetrieveView.SetOutputValues(Entity response, CodeActivityContext executionContext)
   at Gemina.CRM2011.WF.LdgManager.AgRetrieveView.RetrieveSavedQuery(EntityReference inputSavedQuery, CodeActivityContext executionContext)
   at Gemina.CRM2011.WF.LdgManager.AgRetrieveView.ExecuteBody(CodeActivityContext executionContext)
   at Gemina.CRM2011.WF.LdgManager.AgCodeActivityBase.Execute(CodeActivityContext executionContext)
The action that failed was: Demand
The type of the first permission that failed was: System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was: MyComputer

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *