Clean Code

Posts in this category.

How to use InputParameterOrDefault method in The Dataverse Plugin

Jul 2, 2022

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 ado, let's go to my testing about it! Demo 😁 I...

Enforce ConcurrencyBehavior on DataverseServiceClient

Jun 25, 2022

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...

Create Dataverse Record and Set SharedVariable From PowerAutomate

Apr 29, 2022

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...

Empty Available Authorization when using Swashbuckle Swagger .NET 6

Apr 16, 2022

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...

Dataverse Plugin Development: Simplify Your Plugin Code Using This Way!

Oct 16, 2021

When creating a Dataverse Plugin, 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...