Tuesday, July 28, 2020

Custom Icons for DateTime fields in D365 Views

Hi again,
as you might know, there is a supported possiblity how to display custom icons in D365 Customer engagement views.
It's described here:

I will not go through the same steps, I just wanted to share a more info on top of this.

I needed to get the icons to the case views where we have SLA deadline. When deadline is in far future, we want green icon, when it is approaching, we want orange and when the deadline is breached, we want the icon red.

So what yyou need to do is follow the above guide, create icons, create webresource and in that web rource use script like this:

function displayIcon(rowData) {     

    var str = JSON.parse(rowData);

    //new datetime variable

    var checktime = new Date();

    //add 2 hours - needed to evaluate orange icon


    //current time

    var today = new Date();


    //read datetime value - it is returned as a string!

    var slastage = str.new_slastageend;

   // convert to datetime object

    var slastageend = new Date(slastage);


    var imgName = ""; 

    var tooltip = "";


    compare object

    if (checktime.getTime() > slastageend.getTime() && today.getTime() < slastageend.getTime())


             imgName = "orange.png"; 

             tooltip = "SLA Near Breach"; 


    else if (checktime.getTime() < slastageend.getTime())


             imgName = "green.png"; 

             tooltip = "SLA OK";         



    else if (checktime.getTime() > slastageend.getTime())


             imgName = "red.png"; 

             tooltip = "SLA Breached"; 



    var resultarray = [imgName, tooltip]; 

    return resultarray; 

So really, the trick here is to convert the string to datetime and then it is very easy. Also based on this finding, you can see that it is possible to add the icon to any column of any type.


Tuesday, January 7, 2020

Access Team Subgrid Displays all Users

Recently, I have experienced a strange behaviour with Access teams.
I have created a custom entity and enabled Access teams. Then I added a subgrid on the form for the access team members. I used the standard documented way - Form edit - Add subgrid - All records - Users - Record's team members.

I also got a warning, that an access team template must be created. So I saved the form and Published it.
The I created an access team template for my custom entity.

But the grid displayed all users instead of just those who were assigned to the record.
The settings were correct. After some searching, I have to remove the subgrid from the form and create it from scratch. Then it started to work correctly.

So the conclusion is - before you add the subgrid to the form, make sure that you have the Access Team Template created!

I wish you all the best in 2020!


Thursday, February 28, 2019

SI Common solution in Dynamics 365 CRM

We have received a weekly update from Microsoft which caused error in transferring the solution between our environments.
When we tried to import the solution into the target environment, we received error saying:

<Required key="655" type="60" displayName="Přehled prodeje" parentDisplayName="Klient" solution="SICommon (" id="{cb430327-bcc1-416d-959d-db7592e685af}" />
<Dependent key="655" type="60" displayName="Přehled prodeje" parentDisplayName="Klient" id="{cb430327-bcc1-416d-959d-db7592e685af}" />

We don't see such a solution in our system, so we had to ask Microsoft Support for help.
It turned out, that there is a mismatch between our two environments.

The issue we’re seeing is happening due to a version mismatch between source and target environments for the solution “SICommon” which is one of the Microsoft solutions that are not visible from the UI.
On source environment, the version is:
On the target environment, the version is:

Suggested workaround:
If the form is not needed, we can remove the form from the solution on the source environment and re-export the solution
Though this is not recommended, but we can also adjust the solution.xml to remove the tag for missing dependency on this form.

If you don't do anything, it will be solved eventually.

Have a great CRM Day!

Friday, February 8, 2019

Alternate Keys on Connection entity

My customer wanted to manage the connections between accounts and contacts from external system.
We have configured the connection entity and created a new field called new_relationshipid and we used this field for setting up Alternate key, because this is an external id which should be used for future updates by the external system.

So far it is ok. Now comes the trick. When connection is created, the CRM is automatically creating a connection with the opposite direction. The one which you created has attribute ismaster = true. The duplicate one has the attribute set to false.
But when you create an alternate key on the connection entity, you actually block creating the connections. Alternate keys must be unique! So when the system tries to create opposite connection record, it fails.

I have created a ticket with Microsoft Support to handle this issue and the result of this was that the product team will remove the possibility of alternate keys for connection entity from the UI. So we will not be able to use them.

As a result we are forced to create a new custom entity to save connection information.


Tuesday, January 29, 2019

Sharepoint Online Integration - wizard keeps "working" without any error

Last days I have spent quite some on resolving the issue related to Sharepoint integration, so I would like to share my findings with you.

We have an online CRM  (D365CE) instance which we want to connect to the Sharepoint which is in the same tenant. Very simple task, really.

My problem was, that we want to set the site manually, because automatic setting is not how we need to have it in the Sharepoint. So I created the Sharepoint site in Dynamics manually. Then I needed to enable the documents on the entities. Very easy so far.
Then as a last step I wanted to do was to enable the Server Side Sharepoint integration. It did not finish.

The wizard was stuck after the second step, just before you should enter the Sharepoint URL.
I have passed this:
I never got to this:

Very hard to investigate what is going on :-( There was no error, nothing.

I had to contact the support team of Microsoft - they suggested that we need to have Global Admin role to enable the Sharepoint integration (that was not the case, this is not true - you can enable the integration just with Dynamics Admin role). Then they suggested that the URL of Dynamics and Sharepoint should be the same (like xxx.sharepoint.com and xxx.crm4.dynamics.com).
Again, this is just recommendation, but it is not a must.

Finally, we have deleted the existing configuration (the manually created Sharepoint sites) and started the configuration from scratch. It turns out, that you have to start the Server-side Sharepoint integration by enabling this option. Then, the site is automatically created and you can modify it further.

So the conclusion: When you want to use the Server-side Sharepoint integration, always start with enabling it first. Do not make any other changes before you enable the server-side integration!

You don't need to be a System administrator and the URLs do not matter.

Have a good CRM day!

Tuesday, January 22, 2019

Custom solutions history

Dear reader,
in the latest version which has Microsoft released is a new feature :-) !!
I have noticed this in version which has been deployed to us last weekend.
You will find it in the Settings area - it is call CUSTOM SOLUTIONS HISTORY.
It shows the history of imports of your cusotm solutions and the results of these imports.
Previously we were using the xrmtoolbox to enable this feature. Now it is out-of-box.

Great improvement I think.

Thursday, January 3, 2019

Wildcard in UCI

Just a short tip in the new year :-)
Our users are used to wildcard search (*) in lookup fields when working in Dynamics 365.
However, when we started testing the new Unified Interface, we have found out that this wildcard does not work anymore.
Instead we are now supposed to use % as a wildcard.
I hope this helps you.