Showing posts with label fetchxml. Show all posts
Showing posts with label fetchxml. Show all posts

November 26, 2014

CRM 2015 Report Extension and Visual Studio 2012

With the release of Dynamics CRM 2015, Microsoft made available the related tools including the new Report Authoring Extension (the download link is listed under my Resources page).

The Report Extension (required to build FetchXML reports) is now compatible with Visual Studio 2012.
SQL Server Data Tools - Business Intelligence for Visual Studio 2012 must be installed, together with .NET Framework 4.5.2:



Because I had in my machine the CRM 2013 Report Extension, the setup prompted me for Repair or Uninstall:



In this case you need to click Uninstall and relaunch the setup in order to install the 2015 version because choosing Repair will return an error.

After the installation is completed, the template Business Intelligence is available inside Visual Studio:

November 20, 2014

ConditionOperator To FetchXml Operator

Dynamics CRM SDK contains the ConditionOperator enumerator that can be used when building a QueryExpression, but the SDK doesn't provide a way to convert a ConditionOperator to its FetchXml equivalent.

I created a static method that accepts a ConditionOperator enumerator and returns a string containing the equivalent FetchXml operator:

public static string ConditionOperatorToFetchXmlOperator(ConditionOperator conditionOperator)

string fetchXmlOperator = ConditionOperatorToFetchXmlOperator(ConditionOperator.EqualUserId); 
// fetchXmlOperator will be "eq-userid"
The library can be downloaded from Technet Gallery:
https://gallery.technet.microsoft.com/scriptcenter/ConditionOperator-To-065c445e

Note: the library contains the ConditionOperator for CRM 2011, CRM 2013 and CRM 2015.

May 13, 2013

"On or Before" and "On or After" conditions inside FetchXML Reports

Using the Advanced Find function in CRM 2011 is a common way for developers to generate FetchXML to be used inside reports, specially for CRM Online environments where FetchXML is the only way to query the data.
In this example our goal is to create a report that will show all the appointments with start Date on or after the report execution date.