Posted in Dynamics CRM 365 Online

Quick Note: Dynamics 365 CE Limitations


I often find myself struggling to get collated information on limitations on number of different component you can create in dynamics CRM.

I researched and found below link very useful, could not re-blog hence sharing them here. full credits to the owner of this content.

Dynamics 365 CE Limitations On Technet

Limitations On Creating CRM Metdata

If you don’t find anything related to Business Process Flow & Alternate Key Limitations :

  • There can be no more than 10 activated business process flow processes per entity.
  • Each process can contain no more than 30 stages.
  • Multi-entity processes can contain no more than five entities.
  • There can be a maximum of 5 alternate key definitions for an entity

Reference : Business Process Flow Overview  & Define Alternate Keys

Please note – It is strictly applicable to Dynamics CRM 365 Online, May or May not be true for other versions.

Please feel free to comment down below if you know any other limitation on any component in dynamics CRM.


Posted in Dynamics CRM 365 Online

A bit About “Post” In Dynamics 365 CE

What Is It?

Do not get confused between a note & a post, They are two different things. With Posts you can get attention of other users to show some crucial information, they can be auto generated by the system or a user can manually add them. You can do a great collaboration between organisation members using posts. 

On the other hand, Notes are added by a user always and can consist of attachments (posts cannot have attachments).

How to enable post for custom entity OR how to turn on/off post for out of the box entities.

Whenever you create a custom entity a “post configuration” record is created in CRM. for out of the box entities, the post configuration already exists such as opportunity , cases etc.

For any entity (Custom or OOTB) if you have activities/notes enabled; you can have post enabled for it. but for any reason if you dont see it. Go to Settings > Activity Feeds configurations :


look for the entity, i.e in my case I would like to look for contact:


If you don’t see your entity listed here, try to look for it in the “inactive post configurations” view.  Also refresh the feeds from ribbon button, the configuration should appear:


Open the record, you have option to enable it or turn it off:


In my case for my custom entity “Loan” which I have enabled post but those were not appearing on the wall & all i was seeing is Activities and Notes:


So I followed steps mentioned above , went to Settings > Activity feeds configurations > couldn’t see the entity > clicked on refresh button and then I could see the entity and it was in inactive status:


LEARNING : For a custom entity by default the posts are in inactive status & has to enabled manually:

So I opened it,  activated it and enabled for the wall: 


Make sure you publish the related entity and then open the record, you will the post has been enabled:


That’s for this blog – I will try to cover few important features of post in dynamics CRM.

Posted in Dynamics CRM 365 Online


With the Dynamics 365 v9, you can add an auto-number attribute for any entity. Currently, you can add the attribute programmatically. There is no user interface to add this type of attribute. 

I have in my other blog showed how you can achieve this using C#(console application) : CREATE AUTO-NUMBER ATTRIBUTE IN DYNAMICS CRM 365 USING ORGANIZATION SERVICE + SIMPLE CONSOLE APPLICATION

In this blog I am going to show you how you can achieve this using a simple WebApi request, By default this blog will also help you to learn and see how you can use postman to connect with dynamics 365 online to perform certain WEBAPI operations as we will be suing postman to fire a web api request.

  1. If you don’t already have POSTMAN, download desktop application here it here : POSTMAN Desktop Client  or simply add a chrome extension : Chrome Extension . In my case I am using a chrome extension. Launch the application and select Action as “POST”:

  2. Enter below URL in the next url section:
    Enter the correct organization url and entity logical name on which you need to create an auto number field.

  3. Now click on “Headers” and add below:
  4. Now click on “Body” tab and select “raw” option:
  5. Enter below Json request in the editor:
 "AttributeType": "String",
 "AttributeTypeName": {
  "Value": "StringType"
 "Description": {
  "@odata.type": "Microsoft.Dynamics.CRM.Label",
  "LocalizedLabels": [
    "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel",
    "Label": "Serial Number of the widget.",
    "LanguageCode": 1033
 "DisplayName": {
  "@odata.type": "Microsoft.Dynamics.CRM.Label",
  "LocalizedLabels": [
    "@odata.type": "Microsoft.Dynamics.CRM.LocalizedLabel",
    "Label": "Serial Number",
    "LanguageCode": 1033
 "RequiredLevel": {
  "Value": "None",
  "CanBeChanged": true,
  "ManagedPropertyLogicalName": "canmodifyrequirementlevelsettings"
 "SchemaName": "new_AutoNumber",
 "AutoNumberFormat": "WID-{SEQNUM:5}-{RANDSTRING:6}-{DATETIMEUTC:yyyyMMddhhmmss}",
 "@odata.type": "Microsoft.Dynamics.CRM.StringAttributeMetadata",
 "FormatName": {
  "Value": "Text"
 "MaxLength": 100

       6. change the “SchemaName” of the field as per your need in my case its “new_AutoNumber” and also you can change the AutoNumberFormat as we discussed in the last post : : CREATE AUTO-NUMBER ATTRIBUTE IN DYNAMICS CRM 365 USING ORGANIZATION SERVICE + SIMPLE CONSOLE APPLICATION

    7. Okay its starting to look really good. but here comes the important part how do we setup the authentication – to do this click on “Authorization” Tab and select Type as “OAuth 2.0”:

    8. When you select Type as “OAuth 2.0” you have option to “Generate Access Token”


    9.Click on Generate New Access Token:

    10. Enter Details as below : 

      Token Name : Desires Name i.e dynamics crm Online

      AuthURL dynamics crm plain URL i,e

     Access Token URL : 

     Client ID : follow this blog i have created to get client id of your dynamics CRM : REGISTER DYNAMICS CRM APP WITH AZURE FOR OAUTH 2.0 AUTHENTICATION

   11. Now click on Request Access token, you will be asked to login to your dynamics CRM, after successful login you will have a screen below:

     Select the token which we have setup and change “Add token to” to Header and click on “Use Token” which will add this to headers.


    13.  we are all set to execute our request , so click on “Send” , if everything was setup properly you will get success with no response:

   14. Open you dynamics CRM and navigate to Settings > Customizations > Customize the system > entity name > fields and notice the field has been created:

   15. Go ahead and put this field on the form and create some records.


   There you go! I hope this helps! Please feel free to let me know if you face any issues during this operation.

Posted in Dynamics CRM 365 Online

Register Dynamics CRM App With Azure for OAuth 2.0 Authentication

In this blog, I am going to take you through step step process of registering dynamics CRM application with azure.

Why do we even need to do that?

well, If you ever need to use Dynamics CRM OAuth authentication method to be able to connect to dynamics crm using Web API, you are going to need this. follow below steps:

  1. Login to  Azure Portal  ( Use the same credentials as your dynamics crm, if it asks you to sign up and setup trial, you can do that)
  2. Once you have logged in, Navigate to the option “Azure Active Directory” and click on “App registration:

  3. Click on “New application registration”

  4. Add the name of the application and select the Application type as “Native”:

  5. In the URL field enter the URL using which you need to obtain the OAuth authentication token in response to the request from that URL ( In my case I am going to use a POSTMAN call back url : ) > click Create:

  6. It will take some and create the application for you ( Note down the Application ID , you would need it when connecting to dynamics crm using OAuth):

  7. Click on the Settings from the application created and then on Required Permissions:

  8. Now Click on add new:

  9. Then click on Select API:

  10. Select Dynamics CRM Online from Drop Down and click on select:

  11. It will move to the next step “Select Permissions“, select the “Access Dynamics CRM as organization users” option and click on Select again.
  12. Click on Done:
  13. It will take some time and add the required permissions:

    And this is it! the setup is completed , now you can use this app’s Application ID as a Client ID in your application using which you need to connect to dynamics CRM using OAuth such as POSTMAN, SOAP etc.

    I hope this helps!

Posted in CRM Code Helpers, Dynamics CRM 365 Online

Create Auto-Number Attribute In Dynamics CRM 365 Using Organization Service + Simple Console Application

With the Dynamics 365 v9, you can add an auto-number attribute for any entity. Currently, you can add the attribute programmatically. There is no user interface to add this type of attribute.

There are actually two ways of doing this one is using c# code which you can use a console application and other being Web API request.

In  this blog, I will cover the 1st one, and by default this blog will also help you in connecting dynamics CRM 365 with console application.

Create a simple console application


  1. Open Visual Studio and click on new project and select console application project type and give it a name as “AutoNumber” and click on OK.

  2. From your solution manager , right click on “References” and click on “Manager nuget package”:

  3. In the search box enter the name as “Microsoft.CrmSdk.CoreAssemblies” , when result comes > select an click on install. It will install the dynamics crm core assemblies reference needed in the application.

  4. Now from your solution explorer click on add references and again select “System.Configuration” , “System.ServiceModel“and “System.Runtime.Serialization assmeblies“.

  5. Use below namespaces:
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Client;
    using Microsoft.Crm.Sdk.Messages;
    using System.Configuration;
    using System.Net;
    using System.ServiceModel.Description;
    using Microsoft.Xrm.Sdk.Messages;
    using Microsoft.Xrm.Sdk.Metadata;
  6. Copy paste below code in the application:
 IOrganizationService organizationService = null;

                ClientCredentials clientCredentials = new ClientCredentials();
                clientCredentials.UserName.UserName = ConfigurationManager.AppSettings["Username"];
                clientCredentials.UserName.Password = ConfigurationManager.AppSettings["Password"];

                ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                organizationService = (IOrganizationService)new OrganizationServiceProxy(new Uri(ConfigurationManager.AppSettings["CRMUrl"]),
                 null, clientCredentials, null);

                if (organizationService != null)
                    Guid userid = ((WhoAmIResponse)organizationService.Execute(new WhoAmIRequest())).UserId;

                    if (userid != Guid.Empty)
                        Console.WriteLine("Connected to dynamics crm");

                        CreateAttributeRequest widgetSerialNumberAttributeRequest = new CreateAttributeRequest
                            EntityName = "new_autonumber",
                            Attribute = new StringAttributeMetadata
                                //Define the format of the attribute
                                AutoNumberFormat = "DPR-{SEQNUM:5}-{RANDSTRING:6}-{DATETIMEUTC:yyyyMMddhhmmss}",
                                LogicalName = "new_serialnumber",
                                SchemaName = "new_SerialNumber",
                                RequiredLevel = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None),
                                MaxLength = 100, // The MaxLength defined for the string attribute must be greater than the length of the AutoNumberFormat value, that is, it should be able to fit in the generated value.
                                DisplayName = new Label("Serial Number", 1033),
                                Description = new Label("Serial Number of the widget.", 1033)
                        Console.WriteLine("Created the autonumber attribute successfully..");
                    Console.WriteLine("Failed to Established Connection!!!");
            catch (Exception ex)
                Console.WriteLine("Exception caught - " + ex.Message);


        7.  In the code above:

            A. change the entitylogical to the name of the entity where you want to create an autonumber field.  
            B. Give the required logical name of the attribute(which you would like to create).
            C. notice the  code line —-   

AutoNumberFormat = "DPR-{SEQNUM:5}-{RANDSTRING:6}-{DATETIMEUTC:yyyyMMddhhmmss}" 

         In the code above you can actually define what should be the format of your auto number as in example below : 

( Taken from here : AutoNumber  Format Options)
     8. Now in your app.config put below( Insert the correct organization URL , username , password):

<?xml version="1.0" encoding="utf-8"?>
<add key="CRMUrl" value="" />
<add key="Username" value="Username" />
<add key="Password" value="Password" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>

     9.  Build your console application( right click on solution and click “Build Solution” and then Run(Start) it:

    10. If it gets excuted fine , go to your dynamics CRM and open the entity fields from Settings > customizations > customize the system > entityname> fields. You will notice the field is created:

   11. Customize the form and add this field to the form post which try to create a record in dynamics crm. I have create two records and could see below:



     12. Note that you can always update this attrubute if it is created incorrectly by using code given here and using the same application we created :  Update AutoNumber attribute

We can utilize this feature very well for creating an autonumber field in crm. before this we needed created a plugin which will trigger everytime or a workflow with very complex configuration.

Transaction handling:

“SEQNUM” which is The sequential segment is generated by SQL and hence uniqueness is guaranteed by SQL.

In my next blog – we will create an auto number field with more simpler approach of Web API request.


Posted in Dynamics CRM 365 Online

White Paper – Migrate Microsoft Dynamics CRM 2016 On-Premises to CRM 365 Online v9

This consists of steps/considerations for upgrading dynamics CRM 2016 On-Premises v8.1/8.2 to Dynamics CRM 365 Online v9

I would like to thank Ravi Kashyap for helping me validate the process and Andrew Butenko for his nice blog.

A typical migration process should consist of below steps:

  • First things first – Decide the Dynamics CRM 365 Online Customer Engagement Plan
  • Validate your client side & server side code 
  • Backup your existing Data & Customization (Optional)
  • Deploy Customizations to Dynamics CRM Online Instance
  • Active Directory Synchronization
  • Migrate your data
  • Fix JavaScript & Plugins
  • Validate Sitemap
  • Reporting Options in Dynamics CRM Online 365
  • Test,Test & Test Again
  • Copy Instance

1. Decide the Dynamics CRM 365 Online Customer Engagement Plan

Microsoft offers variety of subscriptions based on the functionality required by the business. Now it can be very confusing in terms of costing. There is a tool available which can be used to estimate your costing of Dynamics CRM online implementation:

However, the Microsoft Pricing page the details are also pretty neat to understand :

Microsoft Fast Track Program for Online implementation

This is a special assistance provided by Microsoft for the business who are planning for dynamics CRM Online Implementation and purchasing 250+ license where in Microsoft will take care of the migration of Customization + Data for your CRM. Which literally takes all your headache away!
read more about it here :


2.Validate your client side & server side code

though your code or script in 8.1 should work in Dynamics CRM Online 9.0, it is recommended that these should be updated to use the latest API. For example Page is deprecated in v9, however deprecation doesn’t mean it will stop working right away, it just means that Microsoft has a plan to vanish it in coming updates/releases.

Now there is a very nice tool available which helps to validate your JavaScript by running in your dynamics crm. This XrmToolBox (details here)plugin will scan your environment and Validates your JavaScript Webresources if they are compatible with Dynamics CRM 365 V9. It will tell which method needs to be replaced with what method. More details can be found here :


Note down all the issues , even you can start fixing these in the background. Another point to note is Odata should not at all be used to for any CRUD operation in your system and must be replace by Web API.

Now if we talk about server side code/plugins there is not much difference – the only thing  to be done is to use the latest SDK assemblies version 9, all the latest CRM SDK assemblies are available on the nuget store and should be replace otherwise plugins will not be able to run and communicate with your dynamics CRM. Apart from it the solution must be update to use .net framework 4.5.2 minimum.


3.Backup your existing data & customization

This step is optional and can be skipped.

This step requires a simple backup of your database of Dynamics CRM Organizaton & keeping them in some place.

Step 1: Open SQL Server and Expand Databases. Right Click on required Organization(*****_MSCRM)  to take Backup and Go to Tasks -> Back Up…
Step 2: Would like to provide the new Destination Backup Path.
Step 3: Select path and provide File Name and click on OK.
Step 4: Click on OK to start backup.

4.Deploy Customizations to Dynamics CRM Online Instance

This is probably the most important step, if you are able to perform this without any hiccups; you have done most of the upgrade work.

Its time you export all customizations from your On-Premise environment. Now do not export default solution/customization from your On-Premise environment, rather create a custom solution and add all your customization in the solution. As Microsoft Dynamics CRM Online doesn’t support default customization import.

Once solution has been exported, open your dynamics CRM Online instance and import the solution.

Generally solution to v9.0 from v8.1 can be imported without any issues. But if any errors come, the real time troubleshooting should be done as it’s unpredictable. So, BE READY FOR MULTIPLE TRY/FAULT ATTEMPTS.  If things doesn’t go well , I would suggest to break down the components and then deploy :

      ●  WebResources & OptionSets
      Custom Entities + Dependencies on Standard Entities (like custom view of standard entity used in the subgrid of custom entity form)
        Standard Entities
        Security Roles
        Dashboards & Reports
        Processes & Plugins & Custom Workflow Assemblies
        SiteMap & Application Ribbon

Apart from it Connection Roles, Templates, Field Security Profiles e.t.c can be separated too to avoid “missing dependency error”.

5.Active Directory Synchronization

Transition to dynamics crm online can be really weird and new for the users but doing AD synchronization can definitely comfort them to some extent. If you have a large organization that uses Active Directory to manage your users and groups, setting up Active Directory synchronization will allow you to manage all of your CRM Online users in a central location, avoiding the need to manage multiple user accounts and passwords. In the Office 365 portal, each user record automatically includes user details such as phone number, which is populated from the corresponding user entry in Active Directory. After you assign a CRM license to a user in the Office 365 portal, the user (and all associated details) will appear within the CRM application. If the user’s name or other information is updated in Active Directory, any changes will automatically propagate to CRM.


Here are few links to enable this:

6.Migrate your data

Migration of the data is another important aspect of an upgrade after customization.
There multiple options available such as custom .net code( console application) , Scribe, SSIS along with Dynamics CRM Adapters provided. Based on the volume of data, option can be selected.

Kingsway has a “Starter Package” that can be used a foundation to the migration of data from CRM to CRM.

you can combine Scribe with SSIS for other options such as migrating users. Where in you can get users using SQL query and then create them in dynamics crm online using API. ( we will talk about synchronization of Active Directory with dynamics crm online to be able to let users  use existing logins and email addresses).


7.Fix JavaScript & Plugins

Now that you have your customizations and Data in your dynamics CRM instance, Its time to go back to step 2 – Validate client and server side code.
We have discussed briefly there approach of fixing JavaScript and plugin code as what needs to be done.


8.Validate Sitemap

Now that you have moved your customizations, you might see weird changes on your dynamics CRM online sitemap.

Few ways to fix your sitemap and design your way again.

Using the build in SiteMap designer in dynamics CRM 365 online :

Using SiteMap Editor tool from XRMToolbox:

Manually making changes to sitemap customization xml.


9.Reporting Options in Dynamics CRM Online 365

this is also one of the important aspect of dynamics CRM migration. Since you are moving Online/Cloud, your SQL based SSRS reports will not work. As Dynamics CRM 365 Online doesn’t support SQL based reports.

Hence you might want to consider changing each and every report, however changing them is not option here and also not a straight forward process due to various limitations. You might want to explore other reporting options:

● SSRS fetch XML based report – you can very well create fetch XML based reports. It’s very similar to how you create SQL reports and are fully compatible with dynamics CRM 365 Online.

Power BI – lets you create rich, interactive reports and real-time visualizations in Dynamics 365 for Customer Engagement with Power BI dashboards and tiles that you add to your personal dashboards.

See more:

Excel Templates – Excel provides powerful ways to analyze and present your Dynamics 365 for Customer Engagement data. With Excel templates, you can easily create and share your customized analysis with others in your organization.

See more:



10.Test, Test & Test Again..

You probably had rough days going through the migration process but its not the end until unless you are not fully confident, to gain confidence, you would need a team of testers who can test each and every functionality thoroughly.

While you are on migration – let people create test scripts for each functionality, get them approved by an expert and make sure they touch each and every component of your dynamics CRM.

Create a powerful regression suite – that takes you through end to end huge functionalities i.e. a quote and buy process, lead to invoice process etc.

Don’t hesitate in taking a testing expert with automation experience who can speed up things.
Remember the more you test, the more you gain confidence.


11.Copy Instance

once you have verified and everything looks fine – you would probably want one more instance such as a Dev or UAT environment. You can do that within your subscription.
You have two options while copying this instance Dynamics CRM Online:

● Full copy – A full copy includes all application data, users, and customizations from the source instance.
Minimal Copy – A Minimal copy only includes users, customizations, and schema from the source instance.

Read More :


I hope this helps! 

                                  ****ALL THE VERY BEST****

Posted in Dynamics CRM 365 Online, Microsoft Dynamics CRM Emails, Microsoft Dynamics CRM Solutions

Attach a static PDF to OOTB D365/CRM Workflow

So a recent requirement put to me was to send an email to customers with a specific attachment.

There was also a requirement to ensure the right people would get the email but that was fairly straight forward and manageable through Advance Find/Fetch XML.

I was quite keen to avoid development of a custom workflow activity or plugin to cater for this business objective.

After some investigating I found a fairly straight forward solution:

  1. Create an email template with the body/dynamic tags you wish to and attach the static attachment(in my case a PDF) here
  2. Create your asynchronous workflow as you normally would with the conditional logic and trigger points
  3. When adding the send email action, choose to use email template and call in the email template within the workflow

Simples :)!

Posted in Dynamics CRM 365 Online, Uncategorized

Error While Connecting To CRM Online Using Kingsway SSIS Connector


I have recently got this error when i was preparing an SSIS package for Dynamics CRM 365 Online and used Kingsway SSIS connector.



After digging in further this error is mainly caused by the request and reponse timings,So, when i checked i found out my system time was somehow 5 minutes ahead of the current time, hence the request going to CRM server was of a future time and hence this error showed up.

All i had to do is fix my system time. Sometimes even if your system time is fine, you might still get the error, In that scenario too try to change the time as 5 minutes less.


Once i did that -my organisation name popped up without any issue.


Hope this helps!



Posted in Dynamics CRM 365 Online, Uncategorized

An unsecured or incorrectly secured fault was received from the other party

Issue :

Recently i have encountered this error when i was trying to connect to Dynamics CRM 365 online.



I digged in further and found a post where couple of suggestions were mentioned :

Solution : It was to do with my system settings(Time) – my system time was ahead of the server time. which means the request was going to server with a future time. 

hence i have changed the time in my system clock to be 5 minutes less. Which indeed worked.


I hope this helps!