Tuesday, January 7, 2020

GrapesJS Editor - A PCF control for creating HTML content

Hello there,

My Second PCF Control which is based on ideas from PCF Gallery, please meet GrapesJS CMS Editor a PCF control to create HTML content for multi-line text fields.

Possible use case that i could think of would be to create a New letter from CRM and send it via Email.

Please Refer below Image on how to add the custom control into your form

Sample Email Editor Screen is as below

Sample Email Received:

Source Code can be found here, CRM Solution can be found here

Users can add flip switch control and PBL to showhide default and custom PCF as required in Modal Drivern Apps. That way both email editors can be used as needed.

Guides for Power Apps Components Framework which helped me out are below
  1. Microsoft Docs
  2. PCF Gallery

Please add issues directly to GitHub to help track and fix

Tuesday, November 26, 2019

My First PCF Control - Activity analyzer (using Chartjs)

After a little deepdive and with help of PCF Gallery I was able to create my First PCF control, meet Activity Analyzer a humble PCF Control which shows activity subgrid in doughnut chart. 

With limitless possibilities with PCF control this humble can be grown into hulk. 

For all the fellow Dynamics CRM developers, PCF would be easy to pickup if you have worked on HTML, JS based webresources. Initial trouble i had is with TypeScript which is new to me but was similar to Javascript.

Please Refer below Image on how to add the custom control into your form

Parameters for the Control are as below
  1. View Used : Current View to which the control is added
  2. Activity Names: Names of the activities to be displayed in Chart
  3. Activity Color: Color code for the activities mentioned in param 2.
  4. Chart Type: type of the chart to be displayed (e.g.: pie, bar, doughnut, etc)
  5. Chart Title: Title of the Chart to be displayed.

Source Code can be found here, CRM Solution can be found here

Guides for Power Apps Components Framework which helped me out are below
  1. Microsoft Docs
  2. PCF Gallery

Tuesday, March 13, 2018

Dynamics CRM User Settings Solution

HTML based Dynamics CRM user settings utility which will help to Administrator to set the User settings for Dynamics CRM Users.
This tool was inspired by User settings Utility in Xrm Toolbox, when we hit a limitation that Executable cannot be run in the client environment and there was a 2FA authentication required. This caused me to develop this built in Dynamics CRM html component which can be run from CRM to control the user settings.
You can download the solutions from here

You can view the Source code here in Github

How do i Run this rool?

  • This is an un-managed solution, so you can follow the regular steps to install the solution.
  • After Installation and publishing the components refresh the page.
  • Navigate to Settings->Solution, you can see the User Settings Utility button in the ribbon as below

  • Click on the button to open the user settings utility. Left pane will be the list of users, right pane will be the personal settings option that can be modified.

  • Once user is selected from the list, user settings will be retrieved from CRM and shown. Administrator can modify the settings as required and click on save to update the settings back to CRM. 
  • Multiple Users can be selected from the list of users, and bulk update the values to the selected values from the list of options. If no change is intended for the options then Option  "No Change" can be selected.

Friday, December 16, 2016

Dynamics CRM Modules Explained - Episode 4

We were looking through the Service Module of the Dynamics CRM in the  previous post and other modules in before posts Episode 12.

Service Calendar:

It is similar to the calendar in outlook, just that it helps to view all the scheduled services for the resources in a Day, Week & Month view. User can add an service activity, Appointment, Reschedule/ Schedule a service, resolve conflicting services which takes place in same time with same resources.

Service Level Agreement

SLA is one of the best features of service module which helps to keep track of the case being solved/responded and necessary actions being taken in the agreed time. SLA can be utilized to track performance of the service person & can help Managers to know why a single case would be open for a long long time.

Case Routing

Case can be routed to Service person's according to the configuration of the company and this process can be automated. we will discuss detail on this topic in upcoming posts.

Case Resolution

Case can be resolved along with time spent on the case by the sales person, Case resolution details are being captured & if required a closed case can be re-opened or a child case can be created on the case when required scenario occurs.

Thats all for the modules of the CRM in brief!!.

In the next posts we will be talking on the basic configurations (Settings Module) that are available in the Dynamic CRM along with examples (No coding one's ) following by extending Dynamics CRM

Dynamics CRM Modules Explained - Episode 3


So far i have tried to explain the basics of each module of Dynamics CRM and we have got a chance to read through Marketing and Sales Module. if you directly got here then i recommend you to read the first two series of blogs Episode 1 & Episode 2 before going to this.

Service Module

Service module in MS CRM deals with maintaining post sales service of the business, so when you get a product (e.g. Television) you will get a warranty,which will be dealt by the service personnel in the product company upon repair or troubleshoot installation as per the agreed warranty. Exactly the same is what the service Module is dealing with.

Service module has few main entities and concepts as below:
Case entity, is the main entity of the Service module around which all the functionalities are built.

When a customer calls to a call center or walks to a service center then want to rise a complaint on the product/service he purchased, Service center agent can rise a complaint (Case) in CRM. Case Table consist of details like customer, case description, and previous similar cases, subject and Articles that related to this subject. Entitlement that is available for the customer. Any ongoing other cases for the customer. Let us take a look deep into the case.


Any warranty or service maintenance agreement between the seller and customer is mainly maintained in Entitlement/contracts, so basically entitlement says something like how many cases solved/ how many hours can be spent on solving in a given validity of the agreement. when a case is created for the customer based on the configuration of the entitlement the remaining number of cases/hours of service is reduced accordingly.


When multiple Sales person working on the service center, Queue helps to assign/pick up cases from it once the service personnel is available. A case can be routed to a queue automatically based on configuration in MS CRM.

Articles/KB Articles

Articles are the known issue resolution guides which can be updated when a new issue is encountered and tagged to a particular subject. Thus when a similar case arises from future then the resolution can be used to solve the same. Article can be self help guide which can be emailed or can be published in the self help portal in MS CRM. New Articles entity supports html formatting and rich content editor.


Service is the type of service package that is offered and it explains what will be covered in the service and terms of the service offered. for example when we buy a New mobile the warranty usually goes like this phone is 12 months warranty for internal part failure and manufacturing defects, any issues occurring with manual handling will not be covered. Thus the mobile warranty service is a Type of service that will cover only manufacturing faults and internal part failure within the stipulated time.

Service usually need resources, like to repair a mobile we need resources like Service person, Tool set, Repair station which need to be scheduled. In Dynamics CRM service offered by company can be configured and required resources can be added to it. thus it will help in scheduling the service which will take up and schedule required resources.

Rest of the service module in next post!! 

Till then cheers!!

Thursday, December 15, 2016

Migrating apps from Microsoft.Xrm.Client to Microsoft.Xrm.Tooling

Original Post is here

Today I had a task to migrate couple of apps that used Microsoft.Xrm.Client assemblies to new Tooling assemblies. In this article I will describe steps to use to migrate your own apps to use latest (and recommended) tools to connect to your CRM Instances from code.
Let’s assume that we have an application that uses Microsoft.Xrm.Client assembly to connect to CRM and it stores connection string to CRM in app.config file as it shown on following screenshots:
Also I assumed that NuGet (and not your local hard drive) was as a source for referenced assemblies. To start migration open “Manage NuGet Pakages…” dialog:
Update (if it is required) SDK assemblies to use latest versions available:
Uninstall Microsoft.CrmSdk.Extension package:
Install latest tooling package:
After all operations list of your NuGet packages should look like following:
Following change should be applied to code – removal of references to namespaces Microsoft.Xrm.Client and Microsoft.Xrm.Client.Services and changing of code for getting of service instance from
with adding of reference to Microsoft.Xrm.Tooling.Connector namespace.
Don’t forget to change your connection string according to this article.
If your code throws exception like
An unhandled exception of type ‘System.TypeLoadException’ occurred in Microsoft.Xrm.Tooling.Connector.dll Additional information: Could not load type ‘Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior’ from assembly ‘Microsoft.IdentityModel.Clients.ActiveDirectory, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’.
open installed NuGet packages and downgrade Microsoft.IndentityModel.Client.ActiveDirectory to 2.28.3 version:
After that your code should work fine:

Tuesday, December 13, 2016

Dynamics CRM Modules Explained - Episode 2

In the previous post we have seen the brief introduction of Dynamics CRM and Marketing module, I will be continue with other modules in this blog. I will explain the in-detail functionalities and modules later in upcoming posts.

Sales Module

Let us take a look at what a sales module means and what does CRM have in it for making sales experience smoother.

Sales will be taking care of business once the marketing has completed with the campaigning and lead generation.
Sales person need to schedule Meetings, take notes, have tasks in place for reminders, send emails track emails in system for customer business. Dynamics CRM provision all this features and there are many add-on's which could ease up the job of on-site sales person to have optimized sales route and analytics of sales pattern to guess the business success rate.

Once sales person confirms the business opportunity with customer with a meeting or over a phone call, an Opportunity can be captured in Dynamics CRM to track progress and communication of the sales. Different approval levels can be set to opportunities if business requires so.

Products that are required can be attached to the opportunity from the inventory in Dynamics CRM (Products and related functionalities will be discussed in detail in upcoming posts.)

Post business confirmation from customer, sales person can quote the customer for the products, the Quotation will be formal negotiation with customer on the price, agreed terms and conditions, warranty, delivery, etc. so the quotation can be negotiated many times. In Dynamics CRM Opportunity record can be used to create Quotation which will copy over most of the details from Opportunity, Quote can be activated when it is sent to customer, so that quotation is not changed post sending to customer. Depending on negotiation the quotation can be revised any number of times.

There could be times when customer quote the products in batch, like a set on first quarter and second set of products in 2nd quarter and so on, so Dynamics CRM allows sales person to capture the any number of quotation against an opportunity.

Post negotiation, when the quotation approved by customer, sales person need to create Sales order against the quotation to bill the customer for the product/service they have obtained. In Dynamics CRM the Quotation can be converted to Order and the details from the quote will be carried over to sales order.

Once the order is fulfilled, i.e. product is delivered, Invoice will be raised to customer and sent to customer via respective channels. In Dynamics CRM Order record can be fulfilled/partially fulfilled and invoice can be raised for the order. Invoice record will be created in CRM which will be tagged to quote and order record and Invoice can be printed from CRM as per requirement.