Skip to content

benjaminjohn.de Posts

Working with FetchXML aliases in Power Automate

Posted in Power Automation, Dynamics 365, and Power Platform

In my private project (Key Box), I’ve built a FetchXML statement to group data already during the query, instead of building a logic in Power Automate. For that, I had to set an alias in the query.

FetchXML aliases in Power Automate

When I tried to access the “myOwner” alias, I did not find it in the Dynamics Content list of Power Automate. It only provided me the default Owner choices.

FetchXML aliases in Power Automate

Hoping that this is only a question of visualization, I tried to insert the “Owner (Value)” and got nothing. Therefore, I looked into the result of the Fetch query and found “myOwner”.

FetchXML aliases in Power Automate

tl;dr; How to access now FetchXML aliases in Power Automate?

  1. Select the original owner (or whatever you have) from the dynamic content list
  2. Place the cursor inside your action and copy the inserted formula
  3. Delete the inserted formula
  4. Paste the copied formula inside the expression area of the dynamics content
  5. Replace ‘@{‘ at the start and ‘}’ at the end
  6. Replace the original attribute name with your alias and press “OK”
FetchXML aliases in Power Automate

Create a Dataverse like ribbon button for a Canvas App

Posted in Power Platform, and Dynamics 365

In my private project (Key Box), I’ve created a custom page to edit settings that are stored in an environment variable. To give it the look & feel of Dataverse, it needed a ribbon button to save the settings made. I decided against the awesome Creator Kit because I only required one single button and don’t want to have additional dependencies.

Dataverse like ribbon button

Out of the box buttons in Canvas Apps have no icon. They are text only, except you set an emoji in the text. Therefore, I decided to build my own button with a combination of an icon and a label, that are layered and covered by a transparent button.

FetchXML aliases in Power Automate
FetchXML aliases in Power Automate

Some attributes depend on your preferences, like the height or the position.
Following, you find the main attributes for the button that I used:

Text = ""
Width = 'ico Save'.Width + 'lbl Save'.Width
FillColor = RGBA(1; 1; 1; 0,0)
HoverFillColor = RGBA(0; 0; 0; 0,05)

How to delete a developer environment with Power Automate

Posted in Power Platform, Dynamics 365, and Power Automation

If you only understand the first and the last part of the title, you should click the button below to learn more about the “Power Apps Developer Plan” that includes a free Dataverse for developer (and for makers or course).

Normally Power Platform administrators can create, edit and delete Dataverse environments through the “Power Platform Admin Center” (https://admin.powerplatform.microsoft.com/environments), but developer environments from the “Power Apps Community Plan” differ here.

  • They can only be created through the “Power Apps Developer Plan” page at Microsoft (button above)
  • Everyone with Microsoft work or school account can create one personal development environment per tenant
  • They can not be edited (update name or URL) or deleted through the portal

How to delete a developer environment

I found out, that Nick Doelman already has perfectly described, how to delete a Power App Community Plan environment with PowerShell. Inspired by his blog post, I remembered that there is a “Power Platform for Admins” Connector for Power Automate (and Logic Apps) and I checked it out for you.

  • Open the the Maker Portal (https://make.powerapps.com) and select the default environment of your tenant on the right side of the header menu. Only there the Flow will be later reusable, because you don’t delete it with the environment it exists in.
  • Create a new instant Cloud Flow and give it a name, for example “Reset DevEnvironment”
  • Add an input parameter to the trigger action that will receive the environment ID
FetchXML aliases in Power Automate
  • Search for the “Power Platform for Admins” connector and select it. I got the best search result by typing “PowerApp”.
the power platform for administrators connector
  • Now scroll down and select the “Delete Environment” action.
delete a developer environment with power automate
  • Select “Enter Custom Value” as environment input for the action and choose the ID that comes from the trigger action
FetchXML aliases in Power Automate
  • Save your Flow

Usage of the flow

FetchXML aliases in Power Automate

Now run the Flow and paste the Environment ID as parameter.

FetchXML aliases in Power Automate

The flow run takes something between 30 and 120 seconds and ends with an 404 error, but at the end the environment has gone and you can create a new Power Apps Community Plan Environment again.

FetchXML aliases in Power Automate

“Command Checker” bookmarklet

Posted in Dynamics 365, and Power Platform

Last week, I found out that Microsoft released a Command Checker for model-driven-app-ribbons – OVER 2 YEARS AGO! I totally missed that.
I especially love that it shows me the result of each single display rule and enable rule.

To enable the Command Checker as a button in the ribbon bar, you need to add the URL parameter “ribbondebug=true” to the current D365 CE URL and reload it. But who wants to remember ugly URL parameters…

javascript: (var _href = window.location.href; if (_href.includes("ribbondebug")){_href.replace("ribbondebug=false", "ribbondebug=true")} else {_href += "&ribbondebug=true"} window.location.href = _href)

Open these bookmarklet anywhere in model-driven-app, and it will reload the window with the activated Command Checker.

“Advanced Find” bookmarklet

Posted in Dynamics 365, and Power Platform

Since February 2022, Power Platform Admins can enable the “Modern advanced find in model driven apps“. After a decade of continuity, it is great to see a fresh, clean look and some new features in a unified user interface.

In case you are a CRM veteran like me and also miss the old advanced search, I have something for you.

javascript: (window.open(Xrm.Utility.getGlobalContext().getCurrentAppUrl() + "&pagetype=advancedfind"))

Open these bookmarklet anywhere in Dataverse, and it will open a new window with the classic advanced find in it.
Don’t forget to get used to the new advanced find.