Vibe coding an XrmToolBox tool part 3 - Add ALL the functionality
- Matt Collins-Jones
- 5 minutes ago
- 4 min read
In my last couple of posts, I've discussed how an experiment that I did not think would work, created something otherwise impossible for me, an XrmToolBox tool for listing the solutions a flow is included in. But then I started adding more functionality, like sorting and filtering and exporting a CSV file as well. In this post, I talk about adding more functionality, the designer completely breaking and having something I'm pretty happy with.
One of the first things after this basic functionality I wanted to include logging. While the XrmToolBox includes logging, I wanted to add some additional logging around key functions that could help me troubleshoot if I did have any issues.
A quick prompt to add logging and we are done 🥳
Next up, I tried to think about why I would want to know about solutions the flow is inside and what other functions I would do when I do know these things. Well, what if I wanted to add a flow to a solution or remove it from a solution? 🤔 I could manage the flows from here, rather than now going and finding the solutions and adding or removing, so lets add this.
Thinking about how to do this, I gave Copilot an option.
Create a button on the ribbon called "Managed Flows in Solution". When pressed, create either a dialog or a side panel that allows people to add or remove the flow from a solution. Include a list of solutions the flow is in, a button to add or remove and a drop down with a solution of all unmanaged solutions in the environment.Copilot went off and built this and it was ready to test. It's summary back to me was about adding this functionality, the controls and said it was created as a dialog. I moved the plugin to the right folder, loaded the tool and found the button! Happy days, I pressed it and it did nothing 🤷
I went back and told Copilot that the button did nothing, but there doesn't appear to be a way to select a flow. Copilot added the ability to select a flow row. It did also suggest it could enable multi select, which I opted to not include because I thought that would be confusing and complicated.
Going back to my rebuilt tool and I can now select rows and manage my flows via the button. This then shows a dialog that allows me to manage the flows in the solutions.

One thing I noticed as I was doing that is that there were 2 solutions that I was not that keen with keeping in the tool, 1 of them I didn't actually recognise. I asked Copilot to remove the Default solution and Active solution from the lists of solutions. Thinking that this solution is for Dataverse/Dynamics environments and all the flows would be in the default solution and I didn't want to handle any weird issues where people try to remove solutions from the default solution.
You can notice in the screenshot above (because I'm retrospectively writing this blog as I'm further ahead with the tool), that it has a note for why the default solution is not available in the list.
The functionality for this seemed to work pretty well.
Next up, I wanted to be able to managed the Co-owners of the flows, so that I can easily do this from a single place. Seeing the Primary Owner and Co-owners in a single place and the ability to add and remove Co-owners, in semi bulk way, would be really useful.
Back to prompting and within a few minutes, we have a new button with a new dialog for managed Co-owners.

Again this function seemed to work really well, selecting the rows and then managing the co-owners, adding and removing them, all was great.
Next I wanted to add see if I could make the tool a bit neater. I asked Copilot if I could move my export button, as it was slightly below the ribbon and I thought there was a bit of wasted space there...oh boy was I wrong with this 😂
The next few build produced a broken tool. Well, not technically broken, it would compile without errors, but the designer was complete broken, nothing displayed, only a tiny square with nothing in it. At this point, I wish I'd taken out the advice about proper source control with my project 🤣 but again, this is a learning experience.
After a few panic prompts and me fiddling around in a designer I am completely unfamiliar with, I eventually got my tool back 😅 and I decided where my export and solution bar was fine.

While I've been playing around with this tool, it got me thinking about where it gets this information from and I opened one of my favourite tools, the FetchXML builder and I looked at the workflow table, as that is where the flows are stored. I did a search and found that it includes the description field, which I'd included earlier, but also there is a column called "clientdata" which includes the full JSON structure for the flow. Again, this is the advantage of having knowledge of the platform and what I'm trying to achieve.
I prompted my Copilot with details of the column and even provided it a sample of JSON and asked it to pull out the triggering source, triggering entity and any additional data sources. This is because, people who build flows, don't always name them the way I like to name flows, even with my Best Practices Guides to cloud flows like with triggering entity or data source first, so this allows me to see this data and understand where a flow might be triggered or where it support a solution.
The Copilot added these and the new columns were added to the tool.

I noticed that the data source was the logical name for the data source and not the common name. Yeah, without retrieving the details from Power Platform somehow, it's not going to be 100% the friendly names, but I re-prompted with a few bits and the triggering source looks a little better for some data sources, I may add more over time, but I also don't want to bog the tool down with 1500 logical names I'd be constantly updating.
At this point, it feels like a completed tool. Now time to test and do some optimisations.
Ciao for now
MCJ














