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:

Dynamics CRM for iPad updated with CRM 2015 support

Microsoft updated its iPad app for Dynamics CRM (App Store) with CRM 2015 support.

The App description starts with an important note:
For CRM 2015, this app is supported on iOS 6, 7, and 8. For CRM 2013, it is supported on iOS 6 and 7.
My iPad is still on iOS 7 so I am not able to test this incompatibility.

The Changelog is the following:
  • Use multiple dashboards on the go
  • Personalize your Home page
  • Create records and capture notes while disconnected
  • Support for additional languages
  • Bug fixes
Some Screenshots:






November 24, 2014

My Top 10 Tips for Dynamics CRM Development

Each Dynamics CRM implementation is unique but the problems faced often are not.
Here my Top 10 Tips for Dynamics CRM Development:

  1. Custom Entities have their own privileges
    Developers normally have the higher privileges (like System Administrator role) when they customize CRM but end users not. This means that also Custom Entities privileges must be tuned (and don't forget the Golden Rule: Roles are additive).
    Link: Security role UI to privilege mapping

  2. CRM Online only supports FetchXML reports
    This is one of the well known limitations regarding CRM Online. Reports must use only FetchXML and more important this is true also for OOTB Reports: they are built using SQL Queries and they must be rewritten with FetchXML if you want to apply some changes.
    Link: Dynamics CRM 2011 Online default Reports not editable

  3. DateTime stored values are always in UTC
    DateTime fields in CRM UI show the right values but when you retrieve them by code are not the same? The automatic UTC conversion made by CRM is the reason. For this tip two links.
    Link: Truths about Dynamics CRM Date and Time
    Link: Dynamics CRM DateTimes - the last word?

  4. OData endpoint doesn't support all the CRM operations
    OData is a fast and convenient way for CRUD operations but you still need SOAP to perform some tasks like assigning a record.
    Link: Use web service data in web resources (OData and Modern app SOAP endpoint)

  5. Know the Sandbox limits
    CRM Online only supports Sanbox for Custom Workflow Activities and Plugins. Normally you will be fine, but for some operations you will face these limits (like the impossibility to call IP addresses).
    Link: Plug-in isolation, trusts, and statistics

  6. Dialogs can't be translated
    Dialogs are not included in the normal localization process used for other Dynamics CRM components. The suggested way is to create a dialog for each language you need to support.
    Link: Create solutions that support multiple languages
    Link: CRM Multidialog Multilingual or Language Specific?

  7. Generate the Early Bound classes only for the entities you need
    Personally I prefer Late Bound style but Early Bound has its big advantages. Do you know that you can create the classes only for some entities instead including the 8+ MB file generated by crmsvcutil.exe? Check the tool provided in the link.
    Link: CRM Early Bound Generator

  8. Use Pre-filtering in your reports
    CRM Pre-filtering is a very powerful function allowing users to add additional filters with an Advanced Find interface before the report runs.
    Link: Microsoft Dynamics CRM Pre-Filtering for CRM Reporting

  9. Always customize CRM using a solution
    Small CRM implementations or Dynamics CRM Online sometimes don't have a development environment, in this scenario often happens that customizations are done by "Customize the System" instead using an unmanaged solution. Also if the result looks like the same, not using a solution will make your changes less traceable (and it's better to don't talk about the ugly new_ prefix).
    Link: Introduction to solutions

  10. Use supported methods instead of SQL and DOM manipulation
    "I want the text bigger", "we can make this dropdown red when it's empty?", "this lookup must select only accounts", "we updated the records by SQL". They sound familiar to you? Often some requests can not be implemented using supported methods. Try to explain why and always suggest a supported alternative: instead of making the optionset background red, why not adding a small web resource (like a red dot) beside the field? A small scheduled console application that updates the records with the CRM Web Services can be a solution?
    Link: Supported extensions for Microsoft Dynamics CRM

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.