Before we continue, this blog post will only work if you using Early-Bound on your plugin project (for Late-Bound, you can follow this blog post). The scenario that we will cover is to get rid of the hassle of the below method (I will show you using the code to make it easier): var target … Continue reading Dataverse: Make use of INotifyPropertyChanged to get the latest state of Entity
Category: Clean Code
How to use InputParameterOrDefault method in The Dataverse Plugin
When I scanned Microsoft.Xrm.SDK namespace from Visual Studio, I found an exciting extension in the ContextExtensions class. In there, we can discover InputParameterOrDefault<T> that accepts a string parameter. Without further a do, let's go to my testing about it! Demo đ I created a WebApi (testing) with lots of parameters like the below (I created … Continue reading How to use InputParameterOrDefault method in The Dataverse Plugin
Enforce ConcurrencyBehavior on DataverseServiceClient
Celebrating the GA of DataverseServiceClient, let's talk about how to implement concurrency (if there are two users updating the same data at the same time, the system must ensure only the first update success and make fail the other) using an out-of-the-box feature. From Dataverse itself, we have UpdateRequest and DeleteRequest messages that have ConcurrencyBehavior … Continue reading Enforce ConcurrencyBehavior on DataverseServiceClient
Create Dataverse Record and Set SharedVariable From PowerAutomate
In Dataverse, we can add several additional parameters when we request something that you can check in this documentation. And from all the optional parameters provided, my favorite is the "Tag" parameter that allows us to pass SharedVariable to the Plugin. In the documentation above, you can see how we can pass those parameters using a WebAPI … Continue reading Create Dataverse Record and Set SharedVariable From PowerAutomate
Empty Available Authorization when using Swashbuckle Swagger .NET 6
When I learned to implement authorization in my WebAPI and tested it in Swagger, I noticed the "Available authorization" page was empty (after clicking the lock icon): Empty Authorization dialog For those who don't know Swagger, you can think of this as a framework that offers a systematic way of notating the interface of any RESTful … Continue reading Empty Available Authorization when using Swashbuckle Swagger .NET 6
Dataverse Plugin Development: Simplify Your Plugin Code Using This Way!
When creating Dataverse Plugin, sure we always encounter a scenario where we need to retrieve attribute values of the main entity. But we want to take either from Target's attribute or PreImage/PostImage/Database's attribute. For example, if we have an entity (table) that contains Qty, Price, and Total. If the user changed the Qty attribute, we want to calculate the Total using Target.Qty * … Continue reading Dataverse Plugin Development: Simplify Your Plugin Code Using This Way!
Dynamics CRM Plugin Development: Create Custom API to Get File from File DataType
Today we will learn how to create a Custom API to get a file from File DataType in CRM. I only know that CRM got this DataType when I browsed our beloved community forum last week. I can't find the thread already. But in short, the thread starter questioning how we can get the content … Continue reading Dynamics CRM Plugin Development: Create Custom API to Get File from File DataType
Dynamics CRM Plugin Development: Create TracingServiceExtensions for Logging Time Information
Have you got an error request time out in the plugin? If the plugin only contains simple business logic, It will not be hard to catch the problem. But what if you got lots of business logic that updating more than one entity? Today we will create simple extension functions that you can implement to … Continue reading Dynamics CRM Plugin Development: Create TracingServiceExtensions for Logging Time Information
Dataverse DevOps: Create Tool for Auto Deployment for WebResource + PluginAssembly
One of the topics I wanted to learn and cover is how to do DevOps in a Dataverse environment. DevOps for me is an operation/process that helps to ensure smooth delivery from developer to operation (end-user). The idea is to remove all the unnecessary/recursive process and automate it so all the stakeholders can focus on … Continue reading Dataverse DevOps: Create Tool for Auto Deployment for WebResource + PluginAssembly
Get Environment Variable in a Flow using Custom Web API
Inspired by a blog post by Natraj about "Using Custom API as a trigger for Flow" that you can find here, I am thinking to create a sample collection of Custom Web API that all people can make use of/learn the code (the code design might not be suitable for you, but I open for discussion for … Continue reading Get Environment Variable in a Flow using Custom Web API