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

1 comment: