{"id":316,"date":"2022-12-09T15:59:46","date_gmt":"2022-12-09T13:59:46","guid":{"rendered":"https:\/\/www.kogero.hu\/?p=316"},"modified":"2022-12-31T11:52:41","modified_gmt":"2022-12-31T09:52:41","slug":"plugin-irasa-dataverse-hez","status":"publish","type":"post","link":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/","title":{"rendered":"Create plugin in Dataverse"},"content":{"rendered":"<p><\/p>\r\n<p>In this post I will show you how to write a plugin from scratch for Power Apps model-driven applications like Dynamics 365 or other custom built applications. It can happen you reach the limits of no-code solutions and you need to extend the OOB functionality with custom business logic. In this example we create a plugin, which will copy a telephone number to a contact record from the related account record. But what is a plugin? A plugin is a piece of code written in C# that can be compiled to a DLL file, then uploaded to Dataverse and bound to different events to be executed. I try to explain step-by-step to make it understandable for juniors and citizen developers as well.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h3 class=\"wp-block-heading\">Execution Pipeline in Dataverse<\/h3>\r\n<p>\r\n\r\n<\/p>\r\n<p>Before we jump in it, first I need to mention some words about the &#8220;Event Framework&#8221; to make clear how and when our code can run, which is provided by Dataverse. It helps us to bind our code to run on specific events e.g. creating, updating, deleting, retrieving a record in the system and we can also define more precisely when to run: before our record is being saved or after that. For this we can use 3 stages of 4:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-10.png\" alt=\"Event Exection Pipeline\" class=\"wp-image-346\" width=\"768\" height=\"178\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-10.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-10-300x69.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-10-768x178.png 768w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\r\n<figcaption class=\"wp-element-caption\">Event Execution Pipeline (<a href=\"https:\/\/www.msdynamicsblog.com\/what-is-a-dynamics-crm-plugin\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">source<\/a>)<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Name<\/th>\r\n<th>Description<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>PreValidation<\/td>\r\n<td>In the first stage we can validate user privileges and input data, and we can easily return error message for the user.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>PreOperation<\/td>\r\n<td>Here we can make changes, which are already inside database transaction and will be rolled back in case of any errors. Roll backs are resource intensive operations, so do not do data validations here.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>MainOperation<\/td>\r\n<td>Main Operation where our changes are being saved to database.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>PostOperation<\/td>\r\n<td>Operation after saving changes.<br \/>Important note: asynchronous plugins must be run in this operation.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<figcaption class=\"wp-element-caption\">Execution pipeline<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<h2 class=\"wp-block-heading\">Create Project in Visual Studio 2022<\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<p>Create a project by selecting template &#8220;Class Library (.NET Framework)&#8221;:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"682\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_zj2GmJCpzC-1024x682.png\" alt=\"Create new project in Visual Studio\" class=\"wp-image-321\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_zj2GmJCpzC-1024x682.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_zj2GmJCpzC-300x200.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_zj2GmJCpzC-768x511.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_zj2GmJCpzC-1149x765.png 1149w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_zj2GmJCpzC.png 1268w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Creating new Project<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Select framework &#8220;.NET Framework 4.6.2&#8221;:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"682\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_JXFmUnoaXg-1-1024x682.png\" alt=\"Configure your new project\" class=\"wp-image-322\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_JXFmUnoaXg-1-1024x682.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_JXFmUnoaXg-1-300x200.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_JXFmUnoaXg-1-768x511.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_JXFmUnoaXg-1-1149x765.png 1149w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/devenv_JXFmUnoaXg-1.png 1268w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Configure new Project<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>After creating the project we need to install the SDK that we have to use for developing the plugin: install &#8220;Microsoft.CrmSdk.CoreAssembly&#8221; NuGet package.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"549\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-1024x549.png\" alt=\"Install SDK from NuGet\" class=\"wp-image-329\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-1024x549.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-300x161.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-768x412.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-1536x824.png 1536w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-1426x765.png 1426w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Install SDK from NuGet<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<h2 class=\"wp-block-heading\">Write Business Logic for Plugin<\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<p>The previously installed SDK contains &#8220;Xrm.Sdk&#8221;-t, which provides the basic objects and interfaces to connect to Dataverse and make operations.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Create a new class in the project and add &#8220;using Microsoft.Xrm.Sdk;&#8221; on top.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h3 class=\"wp-block-heading\">IPlugin interface<\/h3>\r\n<p>\r\n\r\n<\/p>\r\n<p>When we are creating a new plugin we need to implement an interface &#8220;IPlugin&#8221;, which contains a method &#8220;Execute&#8221;, and by its input parameter it can get the execution context and services. Organization Service (&#8220;IOrganizationService&#8221;) is one of the most used service in plugins. Important note that all the classes which implement &#8220;IPlugin&#8221; interface will be found as plugin in the Plugin Registration Tool.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>The interface &#8220;IPluginExecutionContext&#8221; contains all the data changes user makes and more. This can be extracted from &#8220;Target&#8221; of &#8220;InputParameters&#8221; :<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<pre title=\"Get target image\" class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp line-numbers\">var isTarget = executionContext.InputParameters.Contains(\"Target\");\r\nvar isTargetTypeEntity = executionContext.InputParameters[\"Target\"] is Entity;\r\n\r\nif (!isTarget || !isTargetTypeEntity) return;\r\n\r\n\/\/ Obtain the target entity from the input parameters.\r\nvar target = (Entity)executionContext.InputParameters[\"Target\"];\r\nvar isTarget = executionContext.InputParameters.Contains(\"Target\");\r\nvar isTargetTypeEntity = executionContext.InputParameters[\"Target\"] is Entity;\r\n\r\nif (!isTarget || !isTargetTypeEntity) return;\r\n\r\n\/\/ Obtain the target entity from the input parameters.\r\nvar target = (Entity)executionContext.InputParameters[\"Target\"];<\/code><\/pre>\r\n<p>\r\n\r\n<\/p>\r\n<p>Important to check if the data even exists and its type every time. Records or rows has usually the object &#8220;Entity&#8221;. We get only raw objects from execution context, therefore we need to cast data every time we use them. The object &#8220;Entity&#8221; has an &#8220;Attributes&#8221; property, which is a dictionary with a key-pair values. It contains the field values from our forms. With this information we can get values in code like this:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<pre title=\"EntityReference\" class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp line-numbers\">var accountRef = (EntityReference)target.Attributes[\"parentcustomerid\"];\r\n\r\n\/\/ Getting account with phone number\r\nvar columns = new ColumnSet(\"telephone1\");\r\nvar account = orgService.Retrieve(\"account\", accountRef.Id, columns);\r\n<\/code><\/pre>\r\n<p>\r\n\r\n<\/p>\r\n<p>When we reference to another record in Dataverse we can do that with a &#8220;Lookup&#8221; field which will has a type &#8220;EntityReference&#8221; in the code. These reference objects store the referenced row ID and logical name.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>When we use the object &#8220;ColumnSet&#8221; we can select which columns we need to reduce the amount of data. This can be crucial for performance. In our example we need only the field &#8220;telephone1&#8221;. Keep in mind that we need the logical name of columns here.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>After retrieving our record we can get the phone number from the Attributes and add it to our contact record. Note: since we plan to run our code in PreOperation stage our changes are still unsaved.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<pre title=\"Setting Attribute Value\" class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp line-numbers\">if (account.Attributes[\"telephone1\"] == null) return;\r\n\r\nvar mainPhone = (string)account.Attributes[\"telephone1\"];\r\ntarget.Attributes[\"company\"] = mainPhone;<\/code><\/pre>\r\n<p>\r\n\r\n<\/p>\r\n<h3 class=\"wp-block-heading\">Whole Plugin code<\/h3>\r\n<p>\r\n\r\n<\/p>\r\n<p>The whole code together:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<pre title=\"Plugin\" class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp line-numbers\">using Microsoft.Xrm.Sdk;\r\nusing Microsoft.Xrm.Sdk.Query;\r\nusing System;\r\n\r\nnamespace kogerohu\r\n{\r\n    \/\/\/ &lt;summary&gt;\r\n    \/\/\/ Copy company phone from related Account main phone column if exists when Account is changed.\r\n    \/\/\/ This operation should commit before data will be saved =&gt; PreOperation\r\n    \/\/\/ &lt;\/summary&gt;\r\n    public class ContactCopyCompanyPhone : IPlugin\r\n    {\r\n        public void Execute(IServiceProvider serviceProvider)\r\n        {\r\n            IPluginExecutionContext executionContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));\r\n\r\n            \/\/ Obtain the Organization Service factory service from the service provider\r\n            IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));\r\n            IOrganizationService orgService = factory.CreateOrganizationService(executionContext.UserId);\r\n            \r\n            \/\/ The InputParameters collection contains all the data passed in the message request.\r\n            var isTarget = executionContext.InputParameters.Contains(\"Target\");\r\n            var isTargetTypeEntity = executionContext.InputParameters[\"Target\"] is Entity;\r\n\r\n            if (!isTarget || !isTargetTypeEntity) return;\r\n\r\n            \/\/ Obtain the target entity from the input parameters.\r\n            var target = (Entity)executionContext.InputParameters[\"Target\"];\r\n\r\n            \/\/ If there is no related account do nothing\r\n            if (!target.Attributes.ContainsKey(\"parentcustomerid\")) return;\r\n\r\n            var accountRef = (EntityReference)target.Attributes[\"parentcustomerid\"];\r\n\r\n            \/\/ Getting account with phone number\r\n            var columns = new ColumnSet(\"telephone1\");\r\n            var account = orgService.Retrieve(\"account\", accountRef.Id, columns);\r\n\r\n            \/\/ If no main phone, do nothing\r\n            if (account.Attributes[\"telephone1\"] == null) return;\r\n\r\n            var mainPhone = (string)account.Attributes[\"telephone1\"];\r\n\r\n            \/\/ Copy account's main phone to contact's company phone\r\n            target.Attributes[\"company\"] = mainPhone;\r\n\r\n            \/\/ Since target goes further on the execution pipeline\r\n            \/\/ And main stage is next, our data will be saved and\r\n            \/\/ we don't have to save our data manually.\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\r\n<p>\r\n\r\n<\/p>\r\n<p class=\"has-text-align-left\">To keep the code simple, not all cases had been handled. The VS project can be found on my GitHub page <a href=\"https:\/\/github.com\/koger23\/PluginExample\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h3 class=\"wp-block-heading\">Build the Project<\/h3>\r\n<p>\r\n\r\n<\/p>\r\n<p>We need to compile our C# code to make it understandable for machines, so we create a DLL file. But to make the upload work properly first we need to sign strongly our project, otherwise we cannot register our assembly.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h4 class=\"wp-block-heading\">Sign the Project<\/h4>\r\n<p>\r\n\r\n<\/p>\r\n<p>To create a key file with extension&#8221;.snk&#8221; we need to execute the following in a developer console: &#8220;sn -k filename.snk&#8221;, which is in my case: &#8220;sn -k kogerohu.snk&#8221;.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>After successful execution go to file explorer in Visual Studio, then right click on the project &gt; select &#8220;Properties&#8221;.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>In the newly opened window select &#8220;Signing&#8221; in the menu on the left, then scroll down to find checkbox &#8220;Sign the assembly&#8221;. Find and select your recently created name key file by selecting &#8220;Browse&#8221; in the drop down.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"491\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2-1024x491.png\" alt=\"Signing assembly in Visual Studio\" class=\"wp-image-332\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2-1024x491.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2-300x144.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2-768x368.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2-1536x737.png 1536w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2-1530x734.png 1530w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-2.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Do not forget to save your changes (Ctrl + S)!<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h4 class=\"wp-block-heading\">Build the Project<\/h4>\r\n<p>\r\n\r\n<\/p>\r\n<p>We have only a few click left: right click on the project in Solution Explorer and select &#8220;Build&#8221; command.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image aligncenter size-full is-style-default\"><img decoding=\"async\" loading=\"lazy\" width=\"441\" height=\"222\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-3.png\" alt=\"Build project in Visual Studio\" class=\"wp-image-335\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-3.png 441w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-3-300x151.png 300w\" sizes=\"(max-width: 441px) 100vw, 441px\" \/>\r\n<figcaption class=\"wp-element-caption\">Building the Project<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>The result of building will be a DLL file under the project under folders &#8220;bin\/Debug&#8221;. In my case the file is &#8220;kogerohu.dll&#8221;. (If you cannot see the bin and Debug folders, select &#8220;Show All Files&#8221; on the ribbon.)<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"387\" height=\"272\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-4.png\" alt=\"Debug folder with DLL in Visual Studio\" class=\"wp-image-336\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-4.png 387w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-4-300x211.png 300w\" sizes=\"(max-width: 387px) 100vw, 387px\" \/>\r\n<figcaption class=\"wp-element-caption\">Debug Folder with DLL<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<h2 class=\"wp-block-heading\">Register Plugin<\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<p>To upload our plugin we will use Plugin Registration Tool.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h3 class=\"wp-block-heading\">Download Plugin Registration Tool<\/h3>\r\n<p>\r\n\r\n<\/p>\r\n<p>The tool can be downloaded from NuGet. To do that, you can use the following Power Shell script, which downloads all the tools we can use during a project. Execute the script in a Power Shell window:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell line-numbers\">[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\r\n$sourceNugetExe = \"https:\/\/dist.nuget.org\/win-x86-commandline\/latest\/nuget.exe\"\r\n$targetNugetExe = \".\\nuget.exe\"\r\nRemove-Item .\\Tools -Force -Recurse -ErrorAction Ignore\r\nInvoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe\r\nSet-Alias nuget $targetNugetExe -Scope Global -Verbose\r\n\r\n##\r\n##Download Plugin Registration Tool\r\n##\r\n.\/nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\\Tools\r\nmd .\\Tools\\PluginRegistration\r\n$prtFolder = Get-ChildItem .\/Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.'}\r\nmove .\\Tools\\$prtFolder\\tools\\*.* .\\Tools\\PluginRegistration\r\nRemove-Item .\\Tools\\$prtFolder -Force -Recurse\r\n\r\n##\r\n##Download CoreTools\r\n##\r\n.\/nuget install  Microsoft.CrmSdk.CoreTools -O .\\Tools\r\nmd .\\Tools\\CoreTools\r\n$coreToolsFolder = Get-ChildItem .\/Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.CoreTools.'}\r\nmove .\\Tools\\$coreToolsFolder\\content\\bin\\coretools\\*.* .\\Tools\\CoreTools\r\nRemove-Item .\\Tools\\$coreToolsFolder -Force -Recurse\r\n\r\n##\r\n##Download Configuration Migration\r\n##\r\n.\/nuget install  Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf -O .\\Tools\r\nmd .\\Tools\\ConfigurationMigration\r\n$configMigFolder = Get-ChildItem .\/Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf.'}\r\nmove .\\Tools\\$configMigFolder\\tools\\*.* .\\Tools\\ConfigurationMigration\r\nRemove-Item .\\Tools\\$configMigFolder -Force -Recurse\r\n\r\n##\r\n##Download Package Deployer \r\n##\r\n.\/nuget install  Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF -O .\\Tools\r\nmd .\\Tools\\PackageDeployment\r\n$pdFolder = Get-ChildItem .\/Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PackageDeployment.Wpf.'}\r\nmove .\\Tools\\$pdFolder\\tools\\*.* .\\Tools\\PackageDeployment\r\nRemove-Item .\\Tools\\$pdFolder -Force -Recurse\r\nEzt k\u00f6vet\u0151en megjelenik az Assembly \u00e9s a Plugin a f\u0151 ablak list\u00e1j\u00e1ban\r\n##\r\n##Remove NuGet.exe\r\n##\r\nRemove-Item nuget.exe<\/code><\/pre>\r\n<p>\r\n\r\n<\/p>\r\n<p>The tools will be downloaded under folder &#8220;..\/Tools\/&#8221;, and the Plugin Registration Tool is found under &#8220;Plugin Registration&#8221; where you can run the &#8220;.exe&#8221; file.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h3 class=\"wp-block-heading\">Work with Plugin Registration Tool<\/h3>\r\n<p>\r\n\r\n<\/p>\r\n<p>After opening the program we need to login to our tenant and select the target environment, then we need to get the following main window, select on the top left &#8220;Register &gt; Register new Assembly&#8221;:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large has-custom-border\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"528\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/OxCODH2WOr-1024x528.png\" alt=\"Plugin Registration Tool\" class=\"wp-image-330\" style=\"border-width: 1px;\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/OxCODH2WOr-1024x528.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/OxCODH2WOr-300x155.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/OxCODH2WOr-768x396.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/OxCODH2WOr.png 1419w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Plugin Registration Tool<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Now browse the DLL file, which is under folder &#8220;Debug&#8221; in our VS project after that leave all the options default.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"533\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/1yipRrnIJD-1024x533.png\" alt=\"Assembly Registration\" class=\"wp-image-338\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/1yipRrnIJD-1024x533.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/1yipRrnIJD-300x156.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/1yipRrnIJD-768x400.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/1yipRrnIJD.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Assembly Registration<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<div class=\"wp-block-simple-note-warning\">Very important note: if you not check any checkbox in &#8220;Step 2&#8221;, those plugins will not be registered or will be deleted from the environment if they already exist in the environment!<\/div>\r\n<p>\r\n\r\n<\/p>\r\n<p>Click on button &#8220;Register Selected Plugins&#8221;. In case of successful registration you should get something like this:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"380\" height=\"319\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-5.png\" alt=\"Registration Summary\" class=\"wp-image-339\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-5.png 380w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-5-300x252.png 300w\" sizes=\"(max-width: 380px) 100vw, 380px\" \/>\r\n<figcaption class=\"wp-element-caption\">Registration Summary<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Now after clicking &#8220;OK&#8221; you should see your plugin on the main window.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h4 class=\"wp-block-heading\">Create Plugin step<\/h4>\r\n<p>\r\n\r\n<\/p>\r\n<p>By a successful registration our assembly and plugin will be uploaded to the Dataverse, but it does nothing so far, because we did not defined after what event and when it should run. To fix this we need to create a so called &#8220;plugin step&#8221;, so browse and select our new plugin from the list and after a right click on it select &#8220;Register New Step&#8221;.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img decoding=\"async\" loading=\"lazy\" width=\"485\" height=\"580\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-6.png\" alt=\"Select Register new Step\" class=\"wp-image-340\" style=\"border-width: 1px;\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-6.png 485w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-6-251x300.png 251w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/>\r\n<figcaption class=\"wp-element-caption\">Select Register new Step<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>A new window pops up, fill it in as follows:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"654\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-7-1024x654.png\" alt=\"Plugin step registration\" class=\"wp-image-341\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-7-1024x654.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-7-300x192.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-7-768x491.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-7-1197x765.png 1197w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-7.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Register new Step<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Important to note that I want the plugin to run on event &#8220;Update&#8221; only for entity &#8220;contact&#8221; only that case if the field &#8220;parentcustomerid&#8221; was changed. Do not forget to select the &#8220;PreOperation&#8221; stage, which helps us to roll back in case of error. If all options are fine, close the window with button &#8220;Register New Step&#8221;.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>If the step registration was successful, it should be appear under our plugin:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"550\" height=\"81\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-8.png\" alt=\"plugin step\" class=\"wp-image-342\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-8.png 550w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-8-300x44.png 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/>\r\n<figcaption class=\"wp-element-caption\">Plugin Step<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<p>Yeah! From now our plugin will be executed if company will be changed on a contact record.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<h2 class=\"wp-block-heading\">Adding to a Solution<\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<p>I would like to show how you can find our changes on the maker portal and place them in a solution. Visit <a href=\"https:\/\/make.powerapps.com\">make.powerapps.com<\/a>, then select your environment on the top right. Create a new or select an existing solution and browse plugin assembly and step as follows:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<figure class=\"wp-block-image size-large has-custom-border\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"550\" src=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9-1024x550.png\" alt=\"Adding Plugin Assembly and Step to the Solution\" class=\"wp-image-343\" style=\"border-width: 1px;\" srcset=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9-1024x550.png 1024w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9-300x161.png 300w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9-768x412.png 768w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9-1536x824.png 1536w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9-1425x765.png 1425w, https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/image-9.png 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption class=\"wp-element-caption\">Adding Plugin Assembly and Step to the Solution<\/figcaption>\r\n<\/figure>\r\n<p>\r\n\r\n<\/p>\r\n<h2 class=\"wp-block-heading\">When to use plugin<\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<p>Instead of using custom code in plugins, you can use workflows to build custom logic as well. Another option is to use Power Automate cloud flows, which is also a no-code low-code tool. Using OOB tools means the customer might not require a programmer for later changes.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Unfortunately all of these tools have their limitations for example in case of Power Automate you logic runs asynchronously which results not having the option to show error message for the user.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>As our logic evolves in both tools it can be tool large to have an overview and can be less productive compared to coding.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>A few aspects when you might need a plugin in Dataverse:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<ul>\r\n<li>If customer does not require only no-code low-code tools in the project, which means the customer might not need a developer for later changes<\/li>\r\n\r\n\r\n\r\n<li>If you need custom logic for calculations or validations for fields e.g. tax number validation or the combination of more fields from different tables<\/li>\r\n\r\n\r\n\r\n<li>If you need a custom message \/ event (not covered in this post)<\/li>\r\n\r\n\r\n\r\n<li>If you need to show error message to user<\/li>\r\n\r\n\r\n\r\n<li>If you do not want to face with limitations during development. Here the only limit is the SDK and C#.<\/li>\r\n\r\n\r\n\r\n<li>If customer require a test coverage and tests written in code<\/li>\r\n<\/ul>\r\n<p>\r\n\r\n<\/p>\r\n<h2 class=\"wp-block-heading\">Summary<\/h2>\r\n<p>\r\n\r\n<\/p>\r\n<p>Whereas we covered briefly &#8220;event framework&#8221; in this post. It helps us to execute custom logic bound to an event in Dataverse. We also created a project in Visual Studio 2022 to write a plugin. Then we checked how to upload it to Dataverse with Plugin Registration Tool.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Finally we checked how to add our changes to a solution.<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<p>Sources:<\/p>\r\n<p>\r\n\r\n<\/p>\r\n<ol>\r\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/developer\/data-platform\/event-framework#event-execution-pipeline\" target=\"_blank\" rel=\"noreferrer noopener\">Event execution pipeline<\/a><\/li>\r\n\r\n\r\n\r\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/power-apps\/developer\/data-platform\/plug-ins\" target=\"_blank\" rel=\"noreferrer noopener\">Use plugins to extend business processes<\/a><\/li>\r\n<\/ol>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>In this post I will show you how to write a plugin from scratch for Power Apps model-driven applications like [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":360,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62,11,32],"tags":[61,54,7,60,58,53,59],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create plugin in Dataverse - KOGERO<\/title>\n<meta name=\"description\" content=\"Step-by-step le\u00edr\u00e1s egyedi \u00fczleti logika \u00fan. plugin \u00edr\u00e1s\u00e1ra Dataverse-ben modellvez\u00e9relt appokhoz, mint p\u00e9ld\u00e1ul a Dynamcis 365.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create plugin in Dataverse - KOGERO\" \/>\n<meta property=\"og:description\" content=\"Step-by-step le\u00edr\u00e1s egyedi \u00fczleti logika \u00fan. plugin \u00edr\u00e1s\u00e1ra Dataverse-ben modellvez\u00e9relt appokhoz, mint p\u00e9ld\u00e1ul a Dynamcis 365.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\" \/>\n<meta property=\"og:site_name\" content=\"KOGERO\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/profile.php?id=100087142779981\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/profile.php?id=100087142779981\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-09T13:59:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-31T09:52:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"koger\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"koger\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\"},\"author\":{\"name\":\"koger\",\"@id\":\"https:\/\/www.kogero.hu\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202\"},\"headline\":\"Create plugin in Dataverse\",\"datePublished\":\"2022-12-09T13:59:46+00:00\",\"dateModified\":\"2022-12-31T09:52:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\"},\"wordCount\":3791,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.kogero.hu\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202\"},\"image\":{\"@id\":\"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp\",\"keywords\":[\"Custom Business Logic\",\"model-driven\",\"Plugin\",\"Plugin Registration\",\"Plugin Registration Tool\",\"Power Apps\",\"Visual Studio\"],\"articleSection\":[\"Dataverse\",\"Dynamics 365\",\"Power Apps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\",\"url\":\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\",\"name\":\"Create plugin in Dataverse - KOGERO\",\"isPartOf\":{\"@id\":\"https:\/\/www.kogero.hu\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp\",\"datePublished\":\"2022-12-09T13:59:46+00:00\",\"dateModified\":\"2022-12-31T09:52:41+00:00\",\"description\":\"Step-by-step le\u00edr\u00e1s egyedi \u00fczleti logika \u00fan. plugin \u00edr\u00e1s\u00e1ra Dataverse-ben modellvez\u00e9relt appokhoz, mint p\u00e9ld\u00e1ul a Dynamcis 365.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[[\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/\"]]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage\",\"url\":\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp\",\"contentUrl\":\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp\",\"width\":680,\"height\":680,\"caption\":\"dataverse_logo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Kezd\u0151lap\",\"item\":\"https:\/\/www.kogero.hu\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Plugin \u00edr\u00e1sa Dataverse-hez\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.kogero.hu\/en\/#website\",\"url\":\"https:\/\/www.kogero.hu\/en\/\",\"name\":\"KOGERO\",\"description\":\"A Power Platform &amp; CRM Developer&#039;s blog\",\"publisher\":{\"@id\":\"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.kogero.hu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202\",\"name\":\"koger\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/10\/logo_kogero.hu_.png\",\"contentUrl\":\"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/10\/logo_kogero.hu_.png\",\"width\":298,\"height\":90,\"caption\":\"koger\"},\"logo\":{\"@id\":\"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.kogero.hu\",\"https:\/\/www.facebook.com\/profile.php?id=100087142779981\"],\"url\":\"https:\/\/www.kogero.hu\/en\/author\/koger\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create plugin in Dataverse - KOGERO","description":"Step-by-step le\u00edr\u00e1s egyedi \u00fczleti logika \u00fan. plugin \u00edr\u00e1s\u00e1ra Dataverse-ben modellvez\u00e9relt appokhoz, mint p\u00e9ld\u00e1ul a Dynamcis 365.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/","og_locale":"en_US","og_type":"article","og_title":"Create plugin in Dataverse - KOGERO","og_description":"Step-by-step le\u00edr\u00e1s egyedi \u00fczleti logika \u00fan. plugin \u00edr\u00e1s\u00e1ra Dataverse-ben modellvez\u00e9relt appokhoz, mint p\u00e9ld\u00e1ul a Dynamcis 365.","og_url":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/","og_site_name":"KOGERO","article_publisher":"https:\/\/www.facebook.com\/profile.php?id=100087142779981","article_author":"https:\/\/www.facebook.com\/profile.php?id=100087142779981","article_published_time":"2022-12-09T13:59:46+00:00","article_modified_time":"2022-12-31T09:52:41+00:00","og_image":[{"width":680,"height":680,"url":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp","type":"image\/webp"}],"author":"koger","twitter_card":"summary_large_image","twitter_misc":{"Written by":"koger","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#article","isPartOf":{"@id":"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/"},"author":{"name":"koger","@id":"https:\/\/www.kogero.hu\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202"},"headline":"Create plugin in Dataverse","datePublished":"2022-12-09T13:59:46+00:00","dateModified":"2022-12-31T09:52:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/"},"wordCount":3791,"commentCount":0,"publisher":{"@id":"https:\/\/www.kogero.hu\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202"},"image":{"@id":"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp","keywords":["Custom Business Logic","model-driven","Plugin","Plugin Registration","Plugin Registration Tool","Power Apps","Visual Studio"],"articleSection":["Dataverse","Dynamics 365","Power Apps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/","url":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/","name":"Create plugin in Dataverse - KOGERO","isPartOf":{"@id":"https:\/\/www.kogero.hu\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage"},"image":{"@id":"https:\/\/www.kogero.hu\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp","datePublished":"2022-12-09T13:59:46+00:00","dateModified":"2022-12-31T09:52:41+00:00","description":"Step-by-step le\u00edr\u00e1s egyedi \u00fczleti logika \u00fan. plugin \u00edr\u00e1s\u00e1ra Dataverse-ben modellvez\u00e9relt appokhoz, mint p\u00e9ld\u00e1ul a Dynamcis 365.","breadcrumb":{"@id":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":[["https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/"]]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#primaryimage","url":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp","contentUrl":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/12\/Dataverse_1600x1600.webp","width":680,"height":680,"caption":"dataverse_logo"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kogero.hu\/en\/2022\/12\/09\/plugin-irasa-dataverse-hez\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Kezd\u0151lap","item":"https:\/\/www.kogero.hu\/en\/"},{"@type":"ListItem","position":2,"name":"Plugin \u00edr\u00e1sa Dataverse-hez"}]},{"@type":"WebSite","@id":"https:\/\/www.kogero.hu\/en\/#website","url":"https:\/\/www.kogero.hu\/en\/","name":"KOGERO","description":"A Power Platform &amp; CRM Developer&#039;s blog","publisher":{"@id":"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kogero.hu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/6c15ee4d93ffb9cabfde83439041c202","name":"koger","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/image\/","url":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/10\/logo_kogero.hu_.png","contentUrl":"https:\/\/www.kogero.hu\/wp-content\/uploads\/2022\/10\/logo_kogero.hu_.png","width":298,"height":90,"caption":"koger"},"logo":{"@id":"https:\/\/www.kogero.hu\/en\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.kogero.hu","https:\/\/www.facebook.com\/profile.php?id=100087142779981"],"url":"https:\/\/www.kogero.hu\/en\/author\/koger\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/posts\/316"}],"collection":[{"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":25,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":588,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/posts\/316\/revisions\/588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/media\/360"}],"wp:attachment":[{"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kogero.hu\/en\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}