Freigeben über


Offline Filters for CRM 2013 outlook client

Hi Folks,

Hope you are enjoying reading my blog!! I want to add a new post which showcases the offline filters functionality of CRM outlook client.

You know the fact that Microsoft Dynamics CRM supports the offline capability with outlook client. Did you get a chance to look into the offline filters available with CRM outlook client?

Here is a chance to look into them.

  1. After configuring CRM with outlook client click on File CRM in your outlook client as shown below.

 

  1. Now click on Go Offline button drop down as shown below:

     

     

  2. You can see the different offline filters that are created in your CRM organization.

 

  1. Here comes the interesting segment. Do you want to create a custom view through fetch xml? If yes is the answer, try this code snippet to get your things rolling on!!
  2. First get the service proxy from the CRM organization before using the below code also add "MyOrganizationCrmSdkTypes.cs" available in your CRM sdk for reference.

 

String fetchXml = @"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>

<entity name='product'>

<attribute name='name' />

<attribute name='producttypecode' />

<attribute name='productnumber' />

<attribute name='subjectid' />

<attribute name='productid' />

<order attribute='name' descending='false' />

<filter type='and'>

<condition attribute='statecode' operator='eq' value='0' />

<condition attribute='name' operator='eq' value='1234' />

</filter>

</entity>

</fetch>";

 

SavedQuery filter = new
SavedQuery();

filter.FetchXml = fetchXml;

filter.IsQuickFindQuery = false;

filter.QueryType = SavedQueryQueryType.OfflineFilters;

filter.ReturnedTypeCode = Product.EntityLogicalName;

 

filter.Name = "Product Sample filter";

 

filter.Description = "Sample offline filter for Product entity";

_offlineFilter = _serviceProxy.Create(filter);

 

This can be used to generate dynamic offline filters. You can use this similar stuff in plugins. Ex: If you want to create an offline filter when a new product is launched or created in your organization. You can automate this process.

 

Hope this helps!!

 

Cheers,

Vishnu

Comments

  • Anonymous
    January 05, 2014
    Pingback from Offline Filters for CRM 2013 outlook client : Interesting Findings & Knowledge Sharing