As Microsoft is providing us more flexibility with Power Automate (MS Flow), now we can retrieve List of solution details and their components directly within Power Automate flows.
Recently, we got a requirement to retrieve the list of solutions and their components from specific environments and store this information in an Excel file on SharePoint.
We can achieve this using Solution and Solution Components entity records in Dynamics CRM.
Below are the steps to achieve this requirement.
This array variable should include the details of the solution component types you want to retrieve from the solution, as shown in the screenshot below.
The above array contains the following details of the solution component types:
You can find all solution component types information in Microsoft Documentation
Add the ‘List rows from selected environment’ step to retrieve the solutions from the specific environment. Use a filter query to retrieve the visible solutions and exclude the default solution.
Step 3: Retrieve Solution Components
Now, proceed to retrieve the solution component for the previously obtained solution. Utilize an ‘Apply to Each’ step to iterate through each solution, and within that, add a ‘List rows’ action to retrieve the solution component using the filter rows.
Step 4: Filter Array step to check the Component Type
For each solution component, implement an ‘Apply to Each’ loop. Inside this loop, use a Filter Array step to check that the Component Type of the current solution component matches the type specified in the array variable we set up earlier.
Expressions from the above image:
Add the ‘List rows’ step to retrieve the solution component if the Component Type matches and add a row into the Excel table.
Expressions from the above image:
Expressions from the above image:
By following these steps, you can retrieve Solutions and their component details using Power Automate flow.