Adding Javascript Functions Using Code Editor

Adding Javascript Functions Using Code Editor

Here is the second part of my ClickDimensions Code Editor blog. The first part of my blog talks about Styling ClickDimensions Web Forms using Code Editor. For the second part, I’ll show you how to use the code editor to add Javascript functions.

There are some cases wherein you need custom actions on your web form components. Form field is not the same as the event handler of the Dynamics CRM fields. We need to use the code editor to apply Javascript on your form fields. To give you a basic example, I will show you how to hide a textbox based on your dropdown list value.

Here are my fields:

The “Please specify *” textbox will only appear if “Other” is selected from the dropdown list. Otherwise, it will be hidden.

Before we proceed in constructing our javascript, we need the ID of our fields. You can check my way in getting the field IDs on the first part of my blog.

As best practice, you need to encapsulate your code inside this:

This way, your code will not be triggered on load of your web forms.

Here is my code:

Note: For the jQuery code to work, I need to replace $ to clickd_jquery.

To explain the code,
#f_3619cd88192be71180fe3863bb367d68  is the field ID of the drop-down list. I used its change event to trigger the code when the field’s value is changed.
#f_a3ead8a71a2be71181033863bb367e08  is the field ID of the text box. To set the visibility of the textbox, I used its hide/show method.

Paste the code in your JavaScript Code Editor.

Save the Code Editor window, as well as the form and see if it works.

When it comes to web forms, Javascript is always present. It’s a good thing that in ClickDimensions, there’s a code editor we could use to enhance and add more functions to the Web Form components. This is very helpful as most of the clients may require functions that are not included out-of-the-box. But let’s keep in mind the important note coming from ClickDimensions itself when using Javascript for your web forms.

Feel free to add a comment for any clarifications or questions.

Published at Tue, 27 Jun 2017 17:00:41 +0000

ClickDimensions Social Engagement for Microsoft Dynamics – First Look!

ClickDimensions Social Engagement for Microsoft Dynamics – First Look!

I was treated to a preview of ClickDimensions Social Engagement (8.8) in the last week, and I was left exceedingly impressed with the capabilities of this new platform. Released to partners at the end of July, it is available now for existing ClickDimension customers.

What is ClickDimensions Social Engagement (CSE)?

CSE is a brand new offering from ClickDimensions and is supplied as an add-on module to existing ClickDimensions customers. ClickDimensions has partnered with Social Media solution vendor Oktopost to provide a lot of the functionality you’re about to see.

At a high level, CSE provides your organisation with a simple yet powerful platform to manage all your social media activity.

The key features of the solution are:

Does this mean that we won’t need Microsoft Social Engagement (MSE)? What are the differences?

In short no, while they do overlap in certain features, they both have their strengths and weaknesses. For instance, you can schedule all your posts to a calendar (incredibly useful!), whereas MSE posts your material immediately to various social platforms (no scheduling). While MSE comes with inbuilt rules that convert your posts to leads/cases, whereas CSE converts posts and stores them in what is known as the Inbox that presumably you could build workflows and do the same. Sentiment analysis is also only available to the MSE platform. So they have similar features but work in very different ways. In my opinion, CSE is targeted more for marketing whilst MSE caters more for social analytics.

What does it look like?

Once the solution is installed, it opens in a separate window and provides you with your social listening dashboard.  Configuration is achieved through the settings menu where you can specify social connectors, search phrases and so forth.

The analytics and scheduling system is pretty impressive, packed with a lot of useful information such as knowing when is the best time of day/week to post.

And a basic breakdown of which networks your customers are engaging on.

The leaderboard system is something quite refreshing, introducing new tools that score your social engagement efforts among team members (game on!).

Final Thoughts

Social Engagement tools have come a long way particularly in the Microsoft Dynamics ISV space. It has been pretty obvious that social selling, social engagement and social perception of companies is becoming more of a priority to companies and the maturity of the tools you see today really reflect that.

The ClickDimensions winning feature in my opinion is how easy it is to schedule your posts, across networks, and from your marketing teams. This is core to the solution, and the process couldn’t be more simple. Though I haven’t read too much about potential extensions on the platform, it would be really good to be able to have the ability to create business rules that redirect inbound social posts to queues, cases and leads like MSE does. But overall, this is a fantastic product and cost/benefit wise it’s an exceptional offering aimed exactly at the right audience (SMEs, B2Bs). Looking forward to seeing more of this new platform!

Originally posted on:

Published at Thu, 21 Sep 2017 19:00:50 +0000

Dynamics 365 Online and ADX Portal (Version 7.0.0024) SharePoint Grid Issue

Dynamics 365 Online and ADX Portal (Version 7.0.0024) SharePoint Grid Issue

Error #1: SharePoint Grid Loading issue

Issue Description

We started getting the error after we upgraded ADX Portal Version 7.0.0021 to ADX Portal 7.0.0024, and Dynamics CRM was upgraded from CRM 2016 to Dynamics 365.

The SharePoint document grid was working fine with ADX Portal version 7.0.0021 and Dynamics CRM 2016; however after it was upgraded to Dynamics 365 and ADX 7.0.0024, we started getting following errors:

Repro Steps

Step 1: Log in to the ADX Portal.

Step 2: Go to the Business Case List Navigation > create Edit Business case.

Step 3: Select the Business Case available to work on from the list (click to open ).

Step 4: Go to the Business Case > Documents tab.

The SharePoint grid is stuck when loading on the webpage.

Dynamics 365 Online and ADX Portal (Version 7.0.0024) SharePoint Grid Issue


During debugging, it was breaking at line 132 as shown in the snapshot below:

In the traces, you can see it wasn’t able to parse ‘ &#32’ which got added in the handlebar tags of the SharePoint  html template.

Below is the SharePoint template and traces for reference:

SharePoint Template


handlebars.js:871 Uncaught Error: Parse error on line 1:
…ass=”toolbar } d
Expecting ‘ID’, ‘DATA’, got ‘INVALID’
at Parser.parseError (handlebars.js:871)
at Parser.parse (handlebars.js:923)
at HandlebarsEnvironment.parse (handlebars.js:1272)
at compileInput (handlebars.js:1735)
at handlebars.js:1744
at Object. (sharepoint-grid.js:132)
at j (jquery-1.11.1.min.js:10)
at Object.fireWith [as resolveWith] (jquery-1.11.1.min.js:10)
at x (jquery-1.11.1.min.js:12)
at XMLHttpRequest.b (jquery-1.11.1.min.js:12)

Following resolution was suggested by Microsoft Support team after we logged the ticket with them.

The issue was related to encoding and was fixed by removing the Encoder Type from the web.config file of the ADX 7.0.0024 website.

  1. Go to the root directory of your website.
  2. Search for file web.config.
  3. Take backup of web.config file.
  4. Open the web.config file in Notepad or Visual Studio editor.
  5. Look for Encoder Type by doing CTRL+F.

  1. Remove the highlighted attribute from the below mentioned tag of web.config file.
  2. Save the web.config File
  3. Restart the website from IIS.

After this fix, we could see the SharePoint grid working properly on the ADX Portal.

Error #2: On Add Files of Share Point Grid we are getting the following Error:

Repro Steps:

Step 1: Login to the Government Portal.

Step 2: Go to the Business Case List navigation > create Edit Business Case.

Step 3: Select the Business Case available to work on from the list (click to open )

Step 4: Go to the Business Case > Documents tab.

Step 5: Click on the Add File button on the grid

Step 6 : Click Browse to add the file and click Add Filea:


The required anti-forgery form field “__RequestVerificationToken” is not present.


Change the mime Type in the Add File function of the SharepointGrid.js

mimeType: “multipart/form-data; charset=utf-8”,

Use the Following Steps to fix the issue:

  1. Go to the path of the website (Installation Folder) > AdxStudio > XrmPortals > Dev > 7.0.0024 > Samples > MasterPortal

  1. Open the Js folder (Installation Folder) > AdxStudio > XrmPortals > Dev>7.0.0024 > Samples > MasterPortal > js.
  2. Edit the file sharepoint-grid.js and search for “Add Files “function.
  3. Change the existing mime type with mime Type: “multipart/form-data; charset=utf-8.

  1. Save the file.
  2. Restart the website from IIS.
  3. Browse and check by adding a document from the SharePoint grid of ADX Portal.

Published at Sun, 25 Jun 2017 17:00:14 +0000

Signature Pad in CRM Portal/ADXStudio

Signature Pad in CRM Portal/ADXStudio

Recently, I faced a challenging and interesting task of implementing Signature Pad in Dynamics CRM Portal/ADXStudio. This blog demonstrates how to implement the HTML5 Signature Pad in CRM Portal/ADXStudio.

It is possible?

Yes, with some tricks, it is possible. Please follow the steps below to achieve it.

Signature Pad Reference

Please use the below link for the example and GitHub code which used as reference to embed the Signature Pad in CRM Portal.

Github Source code link

Signature Pad example link

Steps to Follow

Step 1: In Dynamics CRM, create a new entity, name it as “Signature”, and create the following fields:

Information form in Signature Pad entity (CRM):

Step 2: Create a new entity form record referring “Signature” entity and Respective Information form related to “Signature” entity in Dynamics CRM:

Step 3: By default, .js file is blocked in CRM attachments. For information on how to upload a JavaScript as web file in Dynamics CRM, please refer to the below blog which explains how to upload .js file in CRM Notes.

Dynamics 365 portals: JavaScript as Web Files

After enabling the .js file in CRM:

  1. Create a new web file in CRM.

Create a new web file and use the following configuration for “signature_pad.js” web file record.

Download the JavaScript from this GitHub link and upload the JavaScript file in CRM Notes related to “signature_pad.js” web file record:

  1. Again, create a new web file record in CRM and use the following configuration for “app.js” web file record.

Download the JavaScript from the GitHub link and upload the JavaScript file in CRM Notes related to ““app.js”.

  1. Create new web file record in CRM and use the following configuration for “signature-pad.css” web file record.

Upload the following CSS in notes attachment. I have slightly modified the code from GitHub by removing the background in CSS.

CSS Code:

Save the CSS as “signature-pad.css” and upload in CRM Notes attachment:

Step 4: Create a new web template record in CRM and use the following configuration.

Use the below liquid template to paste in the Source Field in “Create Signature Web Template” record.

Liquid Template Code:

Click on this link to open liquid template code.

Step 5: Create a new Page Template Record in CRM and use the following configuration as mentioned below. Also, refer “Create Signature Web Template” Record.

Step 6: Create a new web page record in CRM and use the following configuration. Also, refer “Create Signature Page Template” record.

Step 7: Create a new metadata column in “Create Signature Entity Form” which is used to display the “success message” once the Signature Pad captured successfully.

Use the following code in Label:

Step 8: Finally, it will display like this in CRM Portal:

Signature Pad Gif Demo:

In my next blog, I will explain how to display the signature in CRM and how to display the signature in SSRS report.

Published at Thu, 13 Jul 2017 17:00:28 +0000

Deploying Adxstudio Website Data

Deploying Adxstudio Website Data


There are two parts in deploying Adxstudio portal: one is deploying the website to its host (unless you’re using hosted model), and the other is deploying website data to Dynamics CRM. In this blog, we’ll discuss deploying website data.

What data?

There are a number of entities and relationships that define a website including web pages, entity list, entity forms, web forms, web roles, and so on. These data need to be updated when you make changes via configuration (or even javascript).

With the normal ALM process developers would make changes in DEV environment, these changes then get deployed to TEST, UAT and finally PROD environment. This process requires means to deploy the changes to different environment efficiently.

What about tools?

Mostly, I have seen Website Copy by Adxstudio being used to deploy this data.

I have personally used it on some projects as well; however, there are some drawbacks to this tool:

  • It always creates new records instead of updating existing records.
  • It can also miss some records. (I have found it doesn’t deploy some form metadata records.)
  • You can’t configure what data is being exported.

All in all, it doesn’t make for a great deployment tool. In fact, this tool was never intended by its maker as such.

Then what?

Since it is effectively data migration, we can theoretically treat it as data migration, export the related data and import it into Dynamics CRM.

With this in mind, we have tried this method in our recent project with ConfigurationMigration tool provided in CRM SDK. We use the tool to create an export schema and use that to export the data from DEV and import it into target environment.

Advantages of using ConfigurationMigration tool:

  • It updates existing records.
  • Ability to configure what data being exported via schema (it is also reusable)
  • It won’t miss any records unless you forgot to include it in the schema.
  • You can use PackageDeployer to deploy.

However, it is far from being a perfect tool. Some drawbacks are:

  • It takes all the records in CRM for a given entity (no filter function).
  • It doesn’t update cleared (blank/null) fields.

In conclusion, we have had some success using ConfigurationMigration tool to deploy portal data. It has some drawbacks, however it proves to be a better way of deployment.

Have you tried this method? Please leave some comments if you have.

If you want to try, please get in touch and I can give you an example of the export schema.

Published at Sun, 23 Jul 2017 17:00:36 +0000

Plugin registration tool stopped connecting to Dynamics 365 , Unable to connect Plugin registration Tool

Plugin registration tool stopped connecting to Dynamics 365

In case you have been trying to get the Dynamics 365 SDK plugin registration tool to work for latest version of Dynamics 365 online and facing issues like this one:

· At making a connection stage the tool keeps on circling all the data centres and still does not connect and gives error such as Bad username or password

· Error during connection such as Bad request

· IF you pick specific data centre also, still get error while connecting.

Well, you need to download the latest plugin registration tool. Following simple steps help to download Dynamics 365 9.0 tools:

You can follow below steps with screens or for more details information look into Microsoft docs link

1. Open Power Shell from windows menu.

2. Navigate to folder location where tools will download.


3. Copy Paste following command in PowerShell command( referred from the Microsoft Link).

$sourceNugetExe = “”

$targetNugetExe = “.nuget.exe”

Remove-Item .Tools -Force -Recurse -ErrorAction Ignore

Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe

Set-Alias nuget $targetNugetExe -Scope Global -Verbose


##Download Plugin Registration Tool


./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .Tools

md .ToolsPluginRegistration

$prtFolder = Get-ChildItem ./Tools | Where-Object

move .Tools$prtFoldertools*.* .ToolsPluginRegistration

Remove-Item .Tools$prtFolder -Force -Recurse


##Download CoreTools


./nuget install Microsoft.CrmSdk.CoreTools -O .Tools

md .ToolsCoreTools

$coreToolsFolder = Get-ChildItem ./Tools | Where-Object

move .Tools$coreToolsFoldercontentbincoretools*.* .ToolsCoreTools

Remove-Item .Tools$coreToolsFolder -Force -Recurse


##Download Configuration Migration


./nuget install Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf -O .Tools

md .ToolsConfigurationMigration

$configMigFolder = Get-ChildItem ./Tools | Where-Object

move .Tools$configMigFoldertools*.* .ToolsConfigurationMigration

Remove-Item .Tools$configMigFolder -Force -Recurse


##Download Package Deployer


./nuget install Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF -O .Tools

md .ToolsPackageDeployment

$pdFolder = Get-ChildItem ./Tools | Where-Object

move .Tools$pdFoldertools*.* .ToolsPackageDeployment

Remove-Item .Tools$pdFolder -Force -Recurse


##Remove NuGet.exe


Remove-Item nuget.exe

4. Hit enter button Tools will be downloaded in specific folder.


5. After successful execution of command check tools downloaded in specific location.



Try using this Plugin registration tool with latest version of Dynamics 365 and it will work just fine.

Hope it helps and Happy Learning.

Written by Deepesh Somani, do visit his blog

Plugin registration tool stopped connecting to Dynamics 365

How to setup Dynamics 365 Portals in CRM Online?

How to setup Dynamics 365 Portals in CRM Online?

Follow the below steps to setup Dynamics 365 Portals in CRM Online,

Step 1:Click here and create Dynamics 365 30 day’s trial version


Use your existing Dynamics 365 Login Credentials to login Office 365 Admin Portal.

Step 2:Click here to navigate to Office 365 Admin Portal.

(For this article, have created Dynamics 365 30 day’s trial version).

Step 3: On the Left hand side menu, you can see Dynamics 365 under Admin Centers. Click on it.

Admin Center - Dynamics 365

Step 4: Follow the below steps,

  1. Click on APPLICATIONS Tab.
  2. Click on Portal Add-On under Manage applications.
  3. Click on MANAGE.

Dynamics 365 Administration Center

Step 5: Provide the below details,

  1. Name: Provide some Name for the Portal.
  2. Type: It is Trial by default.
  3. Select Portal URL: Provide unique name for your portal.
  4. Dynamics 365 Instance: Select your CRM Online Instance name.
  5. Select Portal Language: Select your Portal Language. (For Example: English (United States))
  6. Select Portal Administrator: Select required user to make the person as an Admin for your Portal.
  7. Portal Audience: Select the required Audience to whom this portal for. (For Example: Customer)
  8. Select Portal to be deployed: Select the required portal. Am choosing Dynamics 365 Portals – Custom Portal.

After providing all details, Click on Submit.Dynamics 365 Portal Details

Step 6: Click on Accept.Dynamics 365 Portal - Terms of Service

Step 7: Portal Request is submitted. It will take sometime to import Dynamics 365 Custom Portal Solution to Dynamics 365 CRM and to host the Portal in Azure.

To see the status of the Portal, click on the link as shown in the below picture.

Dynamics 365 Portal - Request Submitted

Step 8: Current Status is as shown below. Please refresh this page after sometime.

Dynamics 365 Portal - Portal being Configured

Step 9: Once portal is created, you can see the Base Portal URL link. Click on it to see your Dynamics 365 Portal.

Dynamics 365 Portal - Portal Created

Step 10: You can see the below Portal Home Page.

Dynamics 365 Portal - Portal Home Page

Step 11: Open Dynamics 365 CRM Online Organization to see the below Portal related Solutions imported and Portals Area in Site Map.

Dynamics 365 Portal - CRM Portals Solutions

Dynamics 365 Portal - CRM Portals Area

Hope you learned a new thing today !!!

Share your valuable feedback on this article.


Published at Mon, 25 Sep 2017 05:33:27 +0000

Microsoft Dynamics 365 Customer Engagement Portals Source Code

Microsoft Dynamics 365 Customer Engagement Portals Source Code


Click here to download Microsoft Dynamics 365 Customer Engagement Portals Source Code.


Published at Mon, 25 Sep 2017 06:30:48 +0000

CRM Portals and Dynamics CRM Portals Feature Comparison

CRM Portals and Dynamics CRM Portals Feature Comparison


Click here for “CRM Portals and Dynamics CRM Portals Feature Comparison