top of page

Recent Posts

Archive

Tags

Vibe coding an XrmToolBox Tool part 2 - Now we vibing!

  • Writer: Matt Collins-Jones
    Matt Collins-Jones
  • 14 minutes ago
  • 6 min read

In my previous post, I wrote about how I tried to build a XrmToolBox tool with no C# or plugin experience by Vibe coding with GitHub Copilot and the results were, quite frankly, amazing! Within a few evenings of a couple of hours each, I managed to use it to not just teach me about building XTB tools, but also build a working one.



This is where we left off, but as you can see from the top, I am hiding something, because after creating a working tool, I wanted it to go further, I wanted to add more functionality. Firstly, going back to the prompt itself I wrote last time, I wanted a tool that would show me a list of flows but give me the solutions that flow was in.


The reason is that I often get asked to help with projects created by other developers, so I am unfamiliar with the solution structure or flows, and often I'm opening multiple solutions to eventually find the one with the flow I require. Ok, I could either create a new solution and add the flow to it or open up the default solution, but the former means I would add another solution to a deployment for little reason and the latter helps me find the flow but not the solution.


My plugin does this.




This was the original goal, just show me a list of the solutions. Job done. I then wanted a way to filter the list of flows, I prompted and added the ability to click on the columns and sort the order of the rows returned (although I'm not sure that's not just default functionality 🤣, but Copilot said it did it) and a drop down which, when selected, shows me just the flows in that solution.



I'm hiding certain aspects for the story telling part of this blog, but this drop down filters the flows! Wow, this is much more than I thought I'd be able to achieve with this. But why do I think this?


Well, when I hear about vibe coding apps, websites etc, I think about it from the perspective that these things are trained, and these are common tasks people are asking for. If the LLM is not specifically trained on these tasks and tuned to them, there would be hundreds or thousands of examples it could pull from and complete it. But I'm asking for something very specific, I'm asking it to create a tool for a tool, I'm asking it to understand the complexities of the Microsoft.crm SDK and then understand technologies like Power Automate and how they interact with Dynamics/Dataverse. Even things like code apps or generative pages, seemed specifically tweaked to work with the Power Platform, so the fact I can do this so simply, is great. Anyway, lets carry on.


At this point, after getting my filter drop down, I'm not quite sure if it was me or the Copilot that suggested an export button, which exports the list of flows, but heck lets add that for....reasons.



So I built and deployed this change and I tried it out and it exported a full list of flows. Yay! And then I filtered the list to a solution with only a couple of flows and hit the export button...and it exported a full list of flows 🙃 But this is where I really started to like Copilot. I described the error and what I found and Copilot reviewed the code and found the problem and fixed it. The next version the export button and filtering worked perfectly. This was a common theme, describing issues and the Copilot finding them and fixed them.

It did make me think though...why is it making these mistakes in the first place? This is an AI, surely it shouldn't make mistakes, but it does and don't call it Shirly, it doesn't like that. But I did start to find some limitations.


Although GitHub Copilot can read my outputs for my projects and it detects when there are failures in the build, and despite the fact that it is creating files for the tool and rebuilding the solution automatically at the end of each instruction, it can't read files 🤷



It can't read a log file if you tell it to find it and you can't upload log files to it either. Instead, you need to copy and paste the entire log or section in the chat window or take a screenshot. I've pretty much been taking screenshots of all my issues so far and Copilot has done really well with this.


Sometimes I can tell it about a problem and it almost doesn't believe it, so I ask it to fix a problem 2 or 3 times and it eventually makes enough changes to fix the problem. Again, I don't think it should be doing this but then I remembered one very important point.


AI was created by people and people are flawed!


Developers can very rarely (never, I just don't want you all coming at me 🤣) write hundreds or thousands of lines of code with no intellisense from memory, with zero bugs and it work exactly as it should. The same is said about AI.


One of the columns that was added when the tool was built was owner or primary owner, which made me think about other functions that this tool could do. What about viewing all the owners and co-owners of a flow, that could be useful. When people leave organisations, which flows need to be updated or have a new primary owner or do you need to check that all flows in production have at least 1 co-owner? This could be really useful.


So I asked Copilot to show me all owners and co-owners and this is where we start to get a bit more technical in terms of domain specific knowledge I had to know and therefore tell Copilot for it to be able to complete this task.


At the moment, I am not connecting to any other APIs, not the Power Automate one or any connectors for handling this, instead this is just connecting to the Dynamics/Dataverse Web API. I did not give instructions to connect to the others and some of the messages about the privileges access writes, I recognise from my experience building and debugging in Dataverse.


The first time I asked it to complete this task it failed, it was just still showing me a list of owners. The second time, it showed me owners, but if there was a co-owner, it showed me them instead of the owner 😒 and this is where I went and found details about how to work with cloud flows through code.



I told the Copilot to look at this URL and use the RetrieveSharedPrincipalsAndAccess function to return a list of users that the flow is shared it. At this point, Copilot error'd and would not give me a response, no matter what I tried, so I suspected there was a service outage and I went to bed.


The next day, I tried something similar, without the URL and Copilot built the function and it now worked and displayed Primary Owner in one column and all co-owners in another column 🥳


I think this is where the true power of vibe coding comes from and where experts can really make use of this technology. Someone with no concept of the SDK or API, functions or how systems fit together, could blindly ask an AI to build something and not understand the implications of what they are doing. While I don't have experience with C# coding, I understand the principals of what I'm trying to achieve, I have the guardrails with the fact that I'm working inside tooling for Dataverse, I'm not trying to recreate security, I'm not trying to take payments or anything else with personal information or integrate with systems I don't understand. Sure the potential of anyone to create anything is there, and I'm all for lowering barriers for entry, it's the purpose of low code, but as I've seen countless times with people building solutions without the idea of scaling, delegation, limitations, appropriate technology etc etc.


Anyway in my next post I will talk about all the extras I've added to the tool. Here's a little preview.



Ciao for now!

MCJ

 
 
 

Comments


Matt Collins-Jones Blog by Matt. ©2026

bottom of page