Configure Similar Record Suggestion using Cognitive Services Text Analytics (Preview) in Dynamics 365 (online)


As a first step, we need to enable text analytics and connect it to CRM.

Follow the below post for enabling text analytics, connecting CRM online to Text Analytics service.

https://nishantrana.me/2017/03/24/configure-case-topic-analysis-using-cognitive-services-text-analytics-preview-in-dynamics-365-online/

As a next step, we need to configure Similar Records Suggestions, for that go to

Settings – Data Management – Similar Records Suggestions settings

Click on New to create a new similarity rule record

Below we have created rule with Case as source entity and specified Yes for “Use Text Analytics for Target Match”

After we have created the similarity rule, we need to define the fields based on which matching will be done and suggestions will be made.

Here we have specified Criteria as Text Match, which would match the Text for the field Case Title of the Case Entity.

Save the above record and click on Activate to run the similarity rule.

Open any of the existing case, in our below scenario we have opened the case with title “Delay in Shipment” and click on +

This opens up the dialog that shows similar cases (with title having Delay word in it) using Text Analytics Service configured.

What happens if we deactivate the Similarity Rule?

We get the below error –

Checking the metric in the Text Analytics API.

Get all the details here

https://technet.microsoft.com/en-us/library/mt703318.aspx

Hope it helps..

Requests to this API should contain at least 100 documents, where each document is not null or empty error while configuring Topic Analysis using Text Analytics in Dynamics 365


Hi,

Recently while trying to configure Topic Analysis in Dynamics 365

https://nishantrana.me/2017/03/24/configure-case-topic-analysis-using-cognitive-services-text-analytics-preview-in-dynamics-365-online/

we got the below error for the failed record.

Error Message:{“code”:”BadRequest”,”message”:”Invalid request”,”innerError”:{“code”:”InvalidRequestContent”,”message”:”Requests to this API should contain at least 100 documents, where each document is not null or empty”,”minimumNumberOfDocuments”:100}}

This was because we had very few case records in our CRM organization < 30. We created few more records to increase the count to be more then 100 and re run the build. This time it got succeeded.

Hope it helps..

Dynamics CRM, Web Job and Azure scheduler


Let us built upon our previous example where we created a Hello World console application, hosted it as web job in Azure App Service and then scheduled it using Azure Scheduler.

Scheduling a Web Job (console application) using Azure Scheduler

Here we will basically update the code in Console Application to use CRM’s assemblies.

Just for simplicity we’d create a lead record in our app and then schedule it to run every 2 minute for total of 5 occurrences.

In real world, obviously, we’d have different scenarios like checking for the status of records and send mail every 24 hour or so, or delete records periodically etc.

We have added the required CRM assemblies

The code to create lead record.

Publishing the updated code.

Running it.

Checking the logs.

Inside CRM it creates the lead record

Now let us re visit our Azure Job Scheduler, update the schedule to run 5 times with interval of 2 minutes.

Click on Run now to run the Job.

We can check the history of the Scheduler Job once it completes –

Logs of the Web Job –

5 Records created in CRM with interval of 2 minutes.

Hope it helps..

Partner Field Service Portal in Dynamics 365.


Dynamics 365 comes with Partner Field Service portal which helps Partners manage work order, service request, assets, invoices, opportunities etc. from within the portal.

Go to Administrator Center, select Portal and click on Manage.

Select Manage Dynamics 365 Instance

Click on Update Dynamics 365 Instance

Select Partner as Audience and Partner Field Service as the portal to be deployed

Once installed this is how Partner Portal looks like

Below are the different menu options that comes OOB.

Partner Program

Opportunities

Customers

Field Service

Below are the Entity Forms associated to the Partner Portal Web site created in CRM.

Below are the Entity Lists associated to the Partner Portal Web site created in CRM.

Around 121 Entity Permission records are added by the Partner Portal

Web Roles specific to Partner Portal.

Below are some of the permission for the Partner Admin web role.

Once the portal is setup next step would be to Become a Partner. Click on Begin Here.

Update the profile and click on submit.

Within CRM, the admin user needs to run the Approve Partner Application workflow on the corresponding portal contact user record.

After workflow succeeds we can assign appropriate web roles to the portal contact user.

The portal user can create customer contacts record

The portal user can raise Service Requests from within the portal.

Can manage Work Orders.

Can manage Opportunities.

The portal has the Dashboard that shows the details around the opportunity and the cases.

Hope it helps..

Manage Dynamics 365 Portal Instance


Suppose we have Community Portal configured in our Dynamics 365 Instance.

Now we would like to have Custom Portal instead of Community Portal associated to our instance.

To configure this, we need go to Admin Centre à Select Portal and Click on Manage

Then select Manage Dynamic 365 CRM Instance and then Update Dynamics 365 Instance

From there we can select the Portal Audience and corresponding Portal to be deployed.

This will install the corresponding portal solution to our CRM Instance.

Now our portal URL will show up the Custom Portal instead of Community Portal.

To switch back to community portal, we can select Portal Details and Update Portal Binding to point it to website we want it to bind to.

Suppose we have Employee self-service portal deployed to our instance and we would like to update binding to it.

Below we select Employee self-service as the web site record and click on Update.

Once update is done, opening the Base Portal URL will open up Employee self-service portal instead of Custom Portal now.

Hope it helps..

Site Settings records specific to Registration in Portal (Dynamics 365)


In Portal, we have few Site Setting records that defines the registration behavior.

By default, if user clicks on Sign In page, we see the below options i.e. Sign In, Register and Redeem Invitation as well as Sign in with an external account.

If we want to disable Local Login then we can set the below Authentication/Registration/LocalLoginEnabled value as false.

This hides the Sign in with Local Account option.

For disabling the Registration option we can set the below site setting record as false.

This hides the Registration tabs from the sign in page

Setting both the above site settings as false, presents the user with the only option of using Azure AD for signing in to the portal.

Hope it helps..

A simple Web Template example in Portal (Dynamics 365)


Let us create a very simple web template that displays logged in user’s name and displays whether the user is in administrator role or not.

The template uses Liquid language

The Web template can be used to define Page Template.

Page template can be of type Web Template or Redirect. Redirect types would be pointing to actual physical aspx page inside the portal.

Now as we have our custom page template defined we can create a new child page in our portal using this new page template.

As we have Use Website Header and Footer checked the page takes it from the web site.

This is how the page renders with our new template

If we uncheck Use Website Header and Footer checkbox, the page renders with only the content (source) defined within the web template.

Apart from being used to define page template, web template can be inserted into the page through editing the copy of the page.

  • Click on Edit

  • Select Insert Template

  • Select the Hello World Template (it also displays the preview) and click Ok.

  • Click on Save

  • This adds our custom web template in the page.

This was a very basic example, please check the below link that contains all the details and real world examples.

https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/liquid-templates/basics/web-template/

Hope it helps..

Using bootstrap classes and components in Portal (Dynamics 365)


As Portals are based on Bootstrap framework we can make use of classes, components etc. specified as part of the framework in our Portal.

Below we have created a new blank page to which we will add content.

Click on Edit in the content editor.

Click on Edit Source icon.

For reference go to the getbootstrap web site

Below are some of the classes that we will add

Lead Class –

Table table-striped class –

Badges Component

Breadcrumbs

Below is our sample source code

This is how it renders in the page.

Hope it helps..

Applying Theme in Portal in Dynamics 365


Suppose we have the below portal configured whose theme we would like to change.

As Portal is based on Bootstrap framework, we can apply any of free bootstrap themes to it.

Go to the below site which offers few free themes.

https://bootswatch.com/

Here we have download the Cerulean theme’s bootstrap.min.css file.

Now inside the portal home page, create a new child file

Name the file as bootstap.min.css

Basically, this creates a web file in CRM that has the bootstrap.min.css file associated as notes attachment to it. (with Home page as the parent page)

Refresh the portal to see the changes

Another way of doing the same is create a new web file or update the bootstrap file attached as attachment to notes in the existing web file.

Download a new theme file.

Delete the existing attachment and upload this newly downloaded theme file.

Refresh the portal.

The theme here gets applied to all the child pages of Home. If we want a different theme for any of the child pages, we can repeat the same step.

For e.g. we want a different theme to be applied to Blog and its child pages. For this we will create a new child file, upload the theme file.

On clicking on any of the child pages of the Blog we can see the new theme applied only to its child page.

Hope it helps..

Managed solution cannot update reports which are not present in solution package. Report 98b86a45-1dbb-e411-b283-d89d6765a2e4 is not part of current solution.


We got this error while trying to import a managed solution to our TEST. The error was because of one error during import we had removed the parent solution from the solution, but we forgot to remove the child report. So this child report during import was trying to update or lookup for the parent report which caused this error.

Removing the child report from the solution and importing it back fixed the issue for us.

Hope it helps..

Invalid Operation: Trying to update an attribute in Live, which is not allowed while importing solution in Dynamics 365


We got this error recently while trying to import a managed solution. As it turned out the we had few OOB reports in our managed solution that was getting imported to TEST.

Removing those OOB reports from the solution, exporting it and importing it again fixed the issue for us and we were able to import the solution successfully.

Helpful post: http://vjcity.blogspot.in/2016/09/trying-to-update-attribute-in-live.html

Hope it helps..

Add hyperlink (and button) in Form Notification in Dynamics 365 (CRM 2016 and earlier)


Recently we were working on a requirement wherein we wanted to add a hyperlink to the Notification that we were showing on the form.

For this we can use the following Jscript library

https://notifyjs.codeplex.com/

The JScript code:

Output:

Clicking on Details opens the page specified in the callback function.

The other option is to show hyperlink within a web resource and putting it inside the form.

https://nishantrana.me/2012/02/09/showing-related-entity-information-in-header-as-hyperlink-crm-2011/

Hope it helps..

“getRequiredLevel is not a function” error while creating a new contact record in Dynamics 365.


We were getting the strange getRequiredLevel is not a function error while creating a new record (in New Form Rendering)

After debugging, we figured out that it was failing for the following field “mapcontrollink”.

We commented out the entire section and imported it back (unsupported). This fixed the issue.

Strangely enough we couldn’t find that field in the Vanilla version, in our case it is the upgraded environment so that could be reason of having that extra field.

Hope it helps..

Deployment Manager – To create a new organization, the wizard must remove the current organization in Dynamics 365 message.


While creating a new organization using Deployment Manager we got the below message

It was because we had entered the Workgroup Product key which restricts it to only organization.

https://technet.microsoft.com/en-us/library/hh699677.aspx

Changing the product key to the server one, allowed creating the new organizations.

Hope it helps..

Not able to register Image for Plugin in Microsoft Dynamics 365 Developer Toolkit (Public Beta 1)


Hi,

While using Developer Toolkit for Dynamics 365 we got strange issue today, the Images were not getting registered for Plugins.

In fact, in the Create New Plugin dialog box we couldn’t see the option of adding images like previous version.

Previous version –

To get more details on the new toolkit refer the below article

http://butenko.pro/2016/11/developer-toolkit-dynamics-365-public-beta-1-whats-new/

Hope it helps..

Using World Map \ Bing Map in SSRS Report in Dynamics 365 (and earlier)


Hi,

Recently I was working on a SSRS Report that will show the countries in the world map (Country was a custom entity in our CRM)

To create such a report, drag the Map report item to the report designer.

OOB we do not have world map in the Map Gallery.

Download it from the following location

https://mapgallery.codeplex.com/releases

Copy the download RDL to the following location (in my case – SQL Server Data Tools for VS 2012)

Select the world map

Add a Bing Map layer

Select Basic map

Click Next and select appropriate value

Click on Finish.

Next inside report designer, right click Layer Data

And specify mapping between the spatial and analytical dataset (our custom dataset here which has 2 column in it, name of the country and A2.

Suppose we have following countries in our CRM

The final report with countries highlighted in colors.

Hope it helps..

Bug in New Form Rendering CRM 2016 Update 1 – Add New button not working for Opportunity Product Sub Grid in Opportunity Form.


Today we got one more product bug in case of New Form Rendering

The Add New Button for OOB Inline Edit Sub grid works properly, however for a new custom sub grid it doesn’t work.

The same works properly in case of Legacy Form Rendering.

Clicking on + button opens the new form for Opportunity Product entity

Below are the other issues that we have faced recently in case of New Form Rendering

https://nishantrana.wordpress.com/2016/11/28/onchange-event-getting-fired-on-setvalue-in-crm-2016-update-1-new-form-rendering/

https://nishantrana.wordpress.com/2016/11/25/recommended-field-showing-up-as-required-field-issue-in-dynamics-365/

Hope it helps..

Cannot update a report from a template if the report was not created from a template error while trying to import solution in Dynamics 365


While trying to import a managed solution to our test environment we got the below error

“Cannot update a report from a template if the report was not created from a template”. We got this error on one specific report.

Removing that particular report from the solution and trying the import again fixed the issue for us.

https://community.dynamics.com/crm/f/117/t/150777

Hope it helps..

SQL Timeout Issue while trying to Apply Solution Upgrade in Dynamics 365


Recently in our project we tried implementing solution upgrade to delete some of the components from the existing managed solution.

https://nishantrana.wordpress.com/2016/10/16/how-to-delete-components-from-managed-solution-in-dynamics-crm-2016-without-using-holding-solution/

However, we kept running into SQL time out issue and it didn’t work for us. Finally we raised product support ticket for it and eventually the product support team increased the SQLCommandTimeout to 5 minutes, which helped us to fix the issue.

Crm Exception: Message: Customer lookup [CustomerId] is invalid. Customer lookups can only be associated with 1 Account and 1 Contact error while importing solution in CRM


While trying to import solution to our test environment from our dev environment we got the below error

 “Crm Exception: Message: Customer lookup [CustomerId] is invalid. Customer lookups can only be associated with 1 Account and 1 Contact”

The way we got it fixed

  • Unzip the solution and open customizations.xml file
  • Remove all attributes with name “CustomerId” (Lead, Invoice, Opportunity entity)

g1

  • Find all entity relationships with ReferencingAttributeName equals CustomerId and add to EntityRelationship new attribute: unmodified=”1″

g2

  • Zip solution back and import it.

https://community.dynamics.com/crm/f/117/t/198818

Hope it helps..

Legacy Form Rendering vs New Form Rendering (Turbo Forms) in Dynamics 365


Hi,

Recently we were analyzing performance improvement we’d gain while moving our solution from legacy form rendering to new form rendering.

For this we picked up the opportunity entity, which had good enough customizations (field, tab, sub grid, JavaScript etc.) in it.

Below is result we got using CRM Performance Center

http://blog.cobalt.net/blog/understanding-the-microsoft-dynamics-crm-performance-center

Hope it helps..

Get the list of all the dirty fields in the form in Dynamics 365


Hi,

Recently on opening our opportunity entity records we were getting unsaved changes message.

To quickly get the list of all the fields

Open the debugger tool and put the following script in the console window

frames[0].Xrm.Page.data.entity.getDataXml();

Check this thread

http://stackoverflow.com/questions/32735019/dirty-form-with-no-dirty-fields-on-crm-2015-online

Hope it helps..

OnChange event getting fired on SetValue in CRM 2016 Update 1 New Form Rendering


Today while doing the analysis of existing system in New Form Rendering, we realized that the SetValue function used on onChange of an attribute was in turn triggering the onChange event for that field.

We basically had an option set field whose value we were setting based on certain condition on onChange event of the same field. This was working fine in Legacy Form Rendering and also in vanilla instance of Dynamics 365.

Only in new form rendering we were getting this issue of infinite loop.

I see the similar issue discussed in the forum

https://community.dynamics.com/crm/f/117/t/165954

We are planning to raise a product support ticket for the same. Let us see what solution the product team will come up with.

Hope it helps..

Using Lookup, LookupSet and Multilookup function in SSRS (Dynamics 365)


Using the Lookup, LookupSet and Multilookup functions we can basically combine values from 2 different data set.

The definition of them are

Lookup/LookupSet/Multilookup(source_expression, destination_expression, result_expression, dataset)

source expression – the field from the source data set (for e.g. primary key)

destination expression – the field to be matched from the destination dataset (sort of foreign key)

result expression – the field whose value has to be returned from the destination dataset

dataset – destination dataset name.

For e.g. we have custom entity Team and Team Members (1 à n)

We have following two DataSet one for Team and one for Team Members.

  1. DSTeam

  1. DSPlayer

The sample report has the Tablix which is bound to DSTeam and has two columns one which is bound new_name field of DSTeam dataset and the second column which gets the player name from DSPlayer dataset.

Output:

Lookup function picks the “first matching value” from the second dataset DSPlayer.

To get all the matching we need to use the LookupSet function (along with Join)

Output:

To understand Multilookup, let us create one more entity Tournament that will have a text attribute which stores comma separated team name.

Let us create one more dataset DSTournament and bound it to a new table. Which have one column which lists the Tournament name and the other column that does the multilookup to DSPlayer to get the player name.

It brings the first matching value, by searching (doing lookup) on multiple value i.e. India and South Africa

Hope it helps..

ID3242: The security token could not be authenticated or authorized error in Report Designer (Dynamics 365, CRM 2016 Online)


While working on Report we suddenly started getting the below error

The strange thing was that the other reports that were using the same data source in the same Report Project were working properly.

Find few posts

http://www.dynamicscrmpros.com/solve-error-id3242-security-token-not-authenticated-authorized-connecting-scribe-microsoft-dynamics-crm/

https://social.msdn.microsoft.com/Forums/en-US/ff35a32e-06bc-4c8c-a77f-793fd3cfefb6/id3242-the-security-token-could-not-be-authenticated-or-authorized?forum=crmdevelopment

but none applied here.

Tried creating a new data source, entered credentials repeatedly but nothing worked, eventually restarted the SQL Server Data Tools (IDE) and it fixed the issue.

Hope it helps..

Error while loading code module ‘Microsoft.Crm.Reporting.RdlHelper’. Could not load file or assembly error in report in Dynamics 365


While trying to preview an existing report in SQL Server Data Tools for Visual Studio 2012 got the below error

To fix it,

Go to Report à Report Properties à References Tab and browse to the correct version of the assembly in the BidExtensions folder

Hope it helps..

Error installing Report Authoring Extension – “Setup cannot continue because there is a pending restart required. Restart the computer and then try running Setup again” in Dynamics 365


While installing Report Authoring Extension got the above error.

Deleting the following Registry Key fixed the issue

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce.
  • HKEY_CURRENT_USER\Software\Microsoft\Windwos\CurrentVersion\RunOnce


Hope it helps..


Recommended Field showing up as Required Field Issue in Dynamics 365


Hi,

Yesterday while doing the analysis of how the existing solution which uses legacy form rendering works for new form rendering, we found a weird issue.

The field which we were setting as recommended through JavaScript was appearing as required. However, its behavior was like recommended field only i.e. we can save the form without specifying value for it.

In left the fields in legacy form rendering and in right Turbo forms or new form rendering

If we inspect through debugger, it seems like the issue is in the image that is being set

We are still analyzing it.

Hope it helps..