Business Unit Name Change

Something small, but yet useful. Thank you Tanguy for the tip🤗

As you probably figured out the Default Business unit name is something you can’t change OOTB after you have created a CRM/Dataverse environment.

If you are not careful when creating a new environment the org name will be set for you, and that is also when the Business Unit Name is set.

This can result in the following main Business Unit, and it just doesn’t make any sense. Also you can’t change it because Parent Business needs to be entered. Problem is that there is no parent to the parent in this case 🤣

XrmToolBox – Bulk Data Update to the rescue😎

Open the view for active Business Units and find your result.

⛔NB!! Make sure your search only returns one business unit

Next thing you do is set a fixed value, add attribute to the bulk job, and the update the record.

GIF Custom Connector

In my last post I wrote about Adaptive Cards in Teams, but a vital factor for that adaptive card to be interesting is the content on the card. Dynamics 365 Sales Adaptive Card🚀.

One of the technical bits last time was connecting with an HTTP GET request to the API. I will be using the same information to create a custom connector so that anyone can reuse for the future 😁

Creating the Connector

Step one.. open https:///make.powerapps.com .

Step 2.. Break down the URL from the first picture like this

Step three… If you don’t really know how to do this, ask a friend!! 🙂

Step three again.. Enter the security settings. When entering the security settings and providing something more than blank, you will be prompted with the credentials first time you create a connection to the connector.

I broke the URL down further with the “api_key” as a query, so that it would show in the URL like the example on the first picture.

Step four.. Create a search tag like the one I had in the URL from the first picture

Step five.. Get the URL from the first picture with your API key, and add this to the import sample

Choose the GET in this case, and add the full URL

Your request should look something like this:

Step 6.. Add a connection to the connector and test with a tag. It should return some info like this:

Result

When you are done, you have a custom connector you can reuse from Power Apps, Flow or any other tool that can use custom connectors.

Connector Gallery 🌌

What better thing to do than release this to the https://connector.gallery when you are done creating a new connector?? :😁💪🥇

🚨Update🚨 Automatic record creation rules NOW!

If you are using email to case, SLA or any Automatic Record Creation in classic you really need to update your rules ASAP to the new UI.

I can’t seem to find the message in the make.powerapps.com, but it’s one of the first messages that appears when opening the classic editor in solutions.

This post is not going to comment the pros/cons of the old vs the new. I will have to come back to you on that one. I am simply stating that you have to do this because it’s not only being deprecated, but it is being shut down. Microsoft has actually created a migration path for the rules, and documented the process fairly well.

https://docs.microsoft.com/en-us/dynamics365/customer-service/migrate-automatic-record-creation-and-sla-agreements

I use these rules for the most in the email to case scenario. First it has some conditions, and then it has the actual create of the case record.

When running through the migration, it does in fact get the conditions correct when migrating, but not the owner that I have in the create statement later. This has to be manually added to the flow created by MS.

Post Migration

After the migration is done, I had the following:

A record rule in the new UI

The conditions also got migrated without issues

And a new flow that Microsoft Autocreates for the email to case record creation. The red box marks where I had to add the “owner” field for the Teams ownership that I normally use.

All of these steps are automatically added by Microsoft. This is also the case if you do a NEW Email to Case from the UI. It feels a bit odd to put my faith in the hands of something automatically created, but for now I have to go with the flow.

NB!!! REMEMBER TO CLICK THE SAVE BUTTON IN FLOW BEFORE ACTIVATING THE RULE

So far it seems to be working OK, but I have to do some more heavy testing before I can conclude that the Flow is as stable as the old rules within Dynamics. We are running it in production, so I will update if I see any problems 🤞

The rise of the Galleries🌌

By now I hope most people know the https://pcf.gallery (run by Guido Preite). A great page for sharing community components (PCF) and exposing awesome contributions to the rest of the world. 🌎

What I like about the PCF Gallery is the simplicity of the site only being about PCF components. This is why I asked Guido if we could create a similar site for other components regarding the Power Platform. He was so kind to share his code for the project, so Matt Beard and I decided to give it a go. 🤗

Connector Gallery

First out in list of future galleries is the CONNECTOR gallery . This site will contain all sorts of custom connectors for Power Platform that you can share with the community. If you want to contribute to this gallery, you only have to share the custom connector file you have on GitHub, and we will post it out!

Dynamics 365 Case add new contact missing

Recently I had this happen twice without really knowing why. The add new contact button was missing on the case form. In the old UI it was present, but in the new UI it was gone.

Problem

Luckily support found out that this is caused by the contact field containing some old “metadata”. All you have to do is remove it and add it back.

FIX

As you see here we have added the same field twice.. Now you can remove the “OLD” contact field and then publish..

Voila!

A pretty random thing to happen, but an easy fix:)

Dynamics / Dataverse Environment Variables in Power Automate

There have been several posts on the environment variables, but I think Microsoft just released a pretty GREAT update recently. I honestly don’t have a clue when this function was released, but it made my day a LOT easier:) This is how we used to refer to Environmental Variables:

Using Environment Variables in Dynamics 365 CRM – Part 1 | Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

Using Environment Variables in Dynamics 365 CRM – Part 2 | Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

Basics

When moving solutions from system A to system B we often have hardcoded values in workflows/flows/javascripts etc. These cause problems because the fields often have different values in each environment.

Sure you can migrate variables/records between systems and be sure to never overwrite, but it can be time consuming to maintain.

Microsoft has introduced environmental variables to Dynamics / Dataverse to fix this exact problem. You create a new Environmental variable in your solution, and you can se the value for each environment. Within CRM you can refer to the environmental variable instead of hardcoded values:)

Within the solution explorer you can add Environmental variables that can be used across the different systems. In this test I am using a variable to define what environment I am working in “Test or Production”.

I wont be writing about the Environment variables in detail, as you can read more about them in other posts, but I wanted to cover the new way of using this within Power Automate!

Accessing the Environmental Variables in Power Automate Flow

Start by creating a new Power Automate, and add compose function

Check out that bad boy! 🤗😎 No longer need for get record calls from entities etc. A nice improvement that will save a few minutes here and there.

Power Automate – finding Dataverse environment URL

There are many ways of getting the current environment URL, but this is the quick and dirty version of doing just this 😏 Next week I will post about Environment variables as I know this is a possible approach that is better.

The intention about this blog is to show how to use Json to parse just a small part of an action body to get what you want exposed.

Power Automate

So this could be a typical flow in Power Automate for Dataverse. We have a trigger on top and an action below to get more data from the element that triggered.

The BODY of the trigger doesn’t contain environment information, but only Opportunity data:

But the Action contains a lot more interesting data for this.

In order to get this data we need to parse the Json returned here to retrieve the “Odata.ID” that includes the URL for our environment.

{
    "type": "object",
    "properties": {
        "@@odata.id": {
            "type": "string"
        }
    }
}

Now you can store the string returned in a String Variable

Running the Power Automate

When you run the Power Automate the the variable Environment will now include the URL of the system running. From here you can use string variables in a formula like:

IF “Environment contains org.crm4” etc.

In my next post I will show how the environmental variables functionality in Dataverse / Dynamics, and how we can use this for the same purpose 😀

Dynamics 365 + Teams integration error

Recently ran into a problem with the Teams integration OOTB, where the integration continuously threw an error after connecting the Dynamics record to the Teams.

This is a pretty Vanilla environment, so I couldn’t quite figure out what was wrong. I obviously could see that the URL was wrong, but I didn’t understand WHY it was wrong.

https://**.sharepoint.com/sites/SuperCards/Shared%20Documents/General <- Nothing really wrong with this URL at first site.

After a lot of painful digging I finally found the issue. Someone had decided to install SharePoint in Norwegian when they first setup the tenant!!! hehe. This meant that the URL the SharePoint URL was wrong.

Wrong URL ⛔

Correct URL ✅

Solution?

Microsoft Support didn’t see a fix in the near future for language support, so I guess it’s time for a small work around 🙂 Not really exciting fix, but you need to create a Workflow or Power Automate on create to change the name of the document location to your local language.

Why a workflow you may ask? When is the last time a workflow failed you I answer 😎

Dynamics / Power Apps + Office App Launcher

Launching a new app or launching a new CRM system always leaves the users with the same question. Where do I find the application? At first I didn’t really understand the question, because I thought it was natural to bookmark the URL to your application ie https://www.company.crm4.dynamics.com/***** etc.

Eventually I realized that most users are actually using the waffle menu in office 365 when navigating to applications that they don’t use continuously.

They were expecting to see the application in the list when you clicked the waffle menu, because this would save them time.

Luckily this is not a problem 😊 Open the all apps, and locate the app you are looking for

And just like that you now have a quick navigation to your CRM or Power App application in the Microsoft 365 app launcher👊

Dynamics 365 form or advanced find images error

This post is almost not relevant any more due to the fact that we all will be pushed into the make.powerapps experience in “the fullness of time”, but I will still be using the classic viewer for the foreseeable future 🙂

From time to the images can get distorted due to unknown reasons. This is not a big deal as the buttons still work, but can be annoying for the users. You might have seen this in the 2 places:

Advanced find:

Advanced Find Menu Error – Microsoft Dynamics CRM Forum Community Forum

Form configuration:

Fix

There seem to be several ways to solve this issue, but not all seem to work the same. I have seen some options describing a cache clear in the console of the browser, but for some reason none of those worked for me. Lately I have had to open the developer tools and delete a bit more manual.

Click F12 in the browser where you see the error

Open the Application tab on the dev tools

Clear or delete anything within the storage related to dynamics.

Try to restart the browser, and hopefully that should do the trick:)