Solution name and version of flow

In this blog I will show you how you can find the related solution and the version of a Power Automate flow. I will demonstrate how you can use Dataverse tables to lookup these values within the flow itself.

Inspiration

This question from SkiDK:

In flows, is it possible to retrieve the solution version number it belongs to?

Power Users Community thread: Get solution version in flow.

Dataverse

Outside the flow it is pretty easy to answer the question, you could for example use a Get-AdminFlow cmdlet of the Microsoft.PowerApps.Administration.PowerShell module.

The challenge was to retrieve this information within the flow itself. Luckily Dataverse has different tables which store information about solutions and the related components. By using the Solutions and Solution Components tables I was able to retrieve the data we are looking for.

Another useful part of this setup was the workflow function. In the tags part there is xrmWorkflowId property which can be used in the filter or the Solution Components table.

Flow setup

relatedionsolutionandversion

1. Add a List rows action. Use the Solution Componments table. Make sure you filter the rows on objectid eq ‘xrmWorkflowId’. The expression can be found below.

listcomponents_objectid

2. Add a Get a row by ID action. Select the Solutions table. Input the Row ID field with the _solutionid_value field value of the first row of the outputs of the previous action. The expression can be found below.

getsolution

3. Add Compose action. Use the Version and Name of the Get a row by ID action. Below are the fields as an expression.

compose_versionname

That is it. Pretty simple setup but imo very useful.

Happy testing!

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.