Accessing Form Header Web Resource

September 14, 2016

Although this Help article states that with Microsoft Dynamics CRM 2016/Online “You can’t include a web resource in a form header or footer”, you certainly can. Sadly, form Footer Web Resource no longer display any content (as it did in version 2015). Form header displays content correctly, but adding it will spread the header fields all over the form width. If you are ok with the UI, you might want to access the header Web Resource programmatically via JavaScript. Maybe when a form attribute value changes, the Web Resource content should change dynamically. Unlike header attributes, which can...
no comments

Update Records with the Import Wizard

September 11, 2016

I recently noticed that in version 2016, the option to export records for update (available in version 2015 as seen below) has vanished from the Export To Excel dialog. When checked, this option allows you to update the exported data and later on use the Import Wizard tool to update existing records. Consulting Faridun Kadir, a fellow MVP, I learned that exporting MSCRM records to a static worksheet exports records GUID (record unique identifier) by default as a hidden column. This GUID is later used by the Import Wizard mechanism to determine if the imported record...
no comments

Entity Scope Business Rules demystified

August 12, 2016

Entity scoped Business Rules run on both client and server side. On the server side, Business Rules are executed synchronously when a record is saved (created or updated) and this means that in some cases, Business Rules can replace synchronous Plug-ins. Business Rules UX is better and maintenance wise, implementing business logic using the declarative Business Rule is preferred over Plug-in custom code.   Sounds great, but for some Business Rule actions the meaning of running on the server side is a bit obscure: Show error message: on client side, the save operation is prevented by the error...
no comments

Rollup Field vs. Security Role

August 10, 2016

One of the professional benefits I gain from training Microsoft Dynamics CRM courses appears from time to time in the form of an innocent question from a student. A question which makes me stop for a moment and think… What would Mr. Spock answer to this? Here is one: Does a Rollup field calculation take the user’s privileges into account?  Let me demonstrate: a user has access to a Project records which contains the Total hours consumed. This is a Rollup field which sums up the related Activity Report records Total Hours field value. The user security Roles prevent...
no comments

Entity JavaScript Scaffold

July 23, 2016

In the last couple of years I have been writing more JavaScript code than Server side code in my Microsoft Dynamics CRM projects. Better UX, plethora of supporting JavaScript libraries, easier deployment and maintenance made me prefer a client side solutions. I usually create a JavaScript library for each entity requiring client side functionality (forms, command bars etc.).Over time, I have formed a JavaScript class scaffold. As this scaffold has improved my productivity when it comes to developing, debugging and maintaining client side code, I would like to share it here. Consistently using this or any other scaffold,...
no comments

Field Level Security – Update, Don’t Read

July 19, 2016

I always assumed Field Level Security privileges are somehow inclusive, meaning you can’t have Update privilege without Read. I was wrong. Defining the Field Security privileges lite this will prevent the profile users from reading the secured field value but will allow them to create with and update it. I can’t think of a business process which requires such behavior, but since Field Level Security apply to APIs as well as UI, it may be useful when external applications are required to update a secured value but are not allowed to retrieve it. 
no comments

Plug-in Configuration Manager Utility

July 15, 2016

Plug-in components often require external configuration settings. Maybe the Plug-in code consumes a web service which end point alternates between test and production environments or maybe you use the Plug-in configuration to turn logging on and off. Basically, any code setting which depend upon external resources is worth exporting to external configuration as it may prevent code re-compilation, additional testing etc. There are some common approaches to implement configuration settings for Plug-in components: Configuration file: each Plug-in instance consumes a configuration file Configuration record: each Plug-in instance executes a query to retrieve a designated Microsoft Dynamics CRM...
no comments

Dude, Where’s My Workflow?

April 27, 2016

There is no built view in Microsoft Dynamics CRM that shows the different solutions to which a component (such as Workflow Rule) is related. If you have many solutions, iterating through all of them can be exhausting and time consuming. The following query retrieve all solution which contain a Workflow Rule named testwf: <fetch version="1.0" mapping="logical">    <entity name="solution">        <attribute name="friendlyname"></attribute>        <link-entity name="solutioncomponent" from="solutionid" to="solutionid" >                      <link-entity name="workflow" from="workflowid" to="objectid">                <filter>                    <condition attribute="name" operator="eq" value="testwf"></condition>                       </filter>                                    </link-entity>        </link-entity>         </entity></fetch> The solutioncomponent entity binds elements such as Workflow Rule to Solutions. The solutionid attribute maps each solutioncomponent...
no comments

Generate Word Documents for Multiple Records

April 15, 2016

Version 2016 Word Templates is a useful feature with one noticeable limitation – when generating a Word Template based document, only one target record can be selected. In many business scenarios, users would like to select multiple records (maybe after executing an Advanced Find query) and generate relevant document in one or two clicks. In this post, I’ll demonstrate a customization based solution for generating Word Template based documents for multiple business records. In a following post, I’ll supply a more generic solution which can be applied to any template/entity. Here is the final result – after implementing the...
2 comments