Dataverse Plugins with an AI Coding Agent — Beginner's Guide, Remade
Dovydas Grigaitis
0:00 / 0:00
Dataverse Plugins with an AI Coding Agent — Beginner's Guide, Remade
374 просмотра · 1 мес. назад
Dovydas Grigaitis
501 подписчик
374 просмотра · 1 мес. назад
Two years ago I made a beginner's guide to Dataverse plugins. It became my most watched video. Everything in it was done by hand: Visual Studio, class library, NuGet packages, signing, typing every line, registering with XrmToolBox.
This is the remake. Same business case, same rules, but built in Cursor with an AI coding agent and the Power Platform CLI. No Visual Studio, no XrmToolBox.
What we build:
• A pre-operation, synchronous plugin on Opportunity Create
• If the related Account is suspended, block the save with a clear error
• If the Account already has an Opportunity from the last three months, set the rating to Hot on the Target (no extra Update call)
What I show along the way:
• Scaffolding a .NET Framework plugin project with the agent
• Keeping my own structure: one class per entity, message and stage
• Giving the agent real Dataverse context through PAC CLI, so it uses the right logical names
• Reviewing the generated code line by line, and catching the mistakes it made
• Deploying from the agent, then having it write a reusable deployment script so it doesn't rediscover the process every time
⏱ Chapters
0:00 Why remake the beginner's guide
1:08 The business case
2:27 Prerequisites: editor, .NET SDK, Power Platform CLI
3:27 Installing the prerequisites
4:39 Scaffolding the project with the agent
5:30 Naming and project structure
6:52 Writing the rules as a prompt
7:15 Giving the agent Dataverse context with PAC CLI
9:21 Letting the agent implement
9:44 Code review: static fields and stateless plugins
10:36 Catching the wrong table name
11:19 Execute, guards and the account lookup
13:09 Retrieving the account and blocking suspended ones
13:47 Checking for recent opportunities
14:48 Setting the rating on the Target in pre-operation
15:50 Fixing the logical name with the agent
17:14 Removing the old plugin
17:39 Don't make the agent rediscover deployment
18:48 Deploying and generating a deployment script
19:53 Testing in Dataverse
20:23 My advice for agentic Dataverse development
20:56 Outro
🔧 Prerequisites (Windows): download the installer OR run the command, not both
1) .NET SDK
Download: https://dotnet.microsoft.com/download
Command: winget install Microsoft.DotNet.SDK.8
2) .NET Framework Developer Pack (pick the version your plugin targets)
Download: https://dotnet.microsoft.com/download...
Command: winget search "Developer Pack" → winget install --id id from the list
3) Power Platform CLI (pac)
Download (MSI installer): https://aka.ms/PowerAppsCLI
Command (needs the .NET SDK from step 1): dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Docs: https://learn.microsoft.com/power-pla...
Or ask your agent to install them, and tell it exactly which of these you want.
Useful PAC CLI commands from the video:
pac auth create --environment https://yourorg.crm4.dynamics.com
pac auth list
pac auth select --index
📺 Original video (the manual way): • How to start with Dataverse Plugins? Begin...
#Dataverse #PowerPlatform #DataversePlugins