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
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.
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.
3. Add Compose action. Use the Version and Name of the Get a row by ID action. Below are the fields as an expression.
That is it. Pretty simple setup but imo very useful.
Happy testing!
Super helpful thanks for that!
I have tried this but I am seeing the error “Correct to include a valid reference to ‘List_rows_-_Solution_Components’ for the input parameter(s) of action ‘Get_a_row_by_ID'”. I don’t need to change of of your code, do I?