Adding Knowledge article in custom entity side panel

There could be a requirement to assist users with knowledge when there are no apps – sales, voice of customer etc installed in the instance. In this case, we will have to enable users access to published knowledge articles.

To achieve the above requirement is quite easy, we will make use of the Xrm.App.sidePanes.getPane APi. First, let’s describe the scenario, we have a custom table and would like to expose the article to users via a side panel. The side panel will be an existing entity record.

Continue reading “Adding Knowledge article in custom entity side panel”

Desrialize and Serialize Json in plugin without newtonsoft library

Often developers struggle with how to handle Json in Plugins, this blog is a way how to serialize and deserialize JSON in plugins without using Imerge or using the new plugin package. Using the method which involves only C# and the default system library, developers can easily serialise and deserialize JSON data.

In the example below, I have created a class that takes a generic T class and then using memory stream to read its value;

Continue reading “Desrialize and Serialize Json in plugin without newtonsoft library”

Preventing default behaviour in PowerApps portal web form

This article would be one of the easiest and shortest article but it needs writing about.

Sometimes, in PowerApps portal, we might have a requirement to prevent the default behaviour of the out-of-box buttons and check for some conditions before continuing. This might sound easy but the normal eventArgs.preventDefault() sometimes would not work and for someone with less experience this could be a problem that could take time to resolve.

To understand how and when to use :

Continue reading “Preventing default behaviour in PowerApps portal web form”

“Undeclared Property Error” in assigning lookup field when using web API Dynamics 365

I was trying to use the Xrm.WebApi.createRecord d365 API to create a record but was getting the error :

“An error occurred while validating input parameters: Microsoft.OData.ODataException: An undeclared property ‘YOUR FIELD’ which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.”

This error seems to be a common error and the solution could be found everywhere online but in my case, the solutions like this still could not resolve the issue. After much debugging and trying several things, the solution below worked for me:

Continue reading ““Undeclared Property Error” in assigning lookup field when using web API Dynamics 365”

Passing objects to Power Automate from Canvas App

In this article, we will see how objects/variables can be passed from a canvass App to a Power Automate. The pre-requisite needed to be able to follow in this post are:

  • Access to Canvas App
  • Access to Power Automate
  • Lastly, a dynamics 365 instance

Here, I have created a canvas with two button – Call PowerAtomate and Create Collection

Continue reading “Passing objects to Power Automate from Canvas App”

Showing meaning plugin error to portal users

In this post, we are going to configure portal settings that will modify plugin errors displayed to portal users, rather than the usual generic error being shown to users.

Below, I have created a plugin that just throws an error anytime a lead is created in portal

Register the plugin on post-operation on Create of a lead. When a portal user creates a lead using the OOB contact-us page, a generic error like the below is returned:

Continue reading “Showing meaning plugin error to portal users”

How to stop plugins from executing programmatically

You might have a situation where you would need to create or migrate records to dynamics using a console app or using any other platforms programmatically, and you don’t want to trigger plugins associated with the targeted entity. In this post, we would see as such a requirement can be met;

Here, I have created the below plugin and registered it to trigger on post Operation of entity Create, in this case, Account entity.

Continue reading “How to stop plugins from executing programmatically”

Passing variable/JSON from Power Automate to Canvas App

In this post, we will look at passing variable(s) from power automate to a Canvas App. Prerequisite for this post will be:

  • Access to Power Automate
  • Access to Create a canvas App
  • A single dynamics 365/power platform license.

We would create manually create and spit out a Json out via our power automate, call the power automate in the canvas App and make use of the output in canvas App.

Continue reading “Passing variable/JSON from Power Automate to Canvas App”

Dynamically Render Different Portal Entity form depending on field Value

In portals, we can have a requirement where the customer wants to display a distinct form of an entity to users based on the value on a field. This requirement can be achieved by using a custom web template where the form entity would be rendered based on conditions.

In this post, I have created an entity called Trip, created two different forms to be displayed to the portal end-users. The Birmingham form will be rendered if we set the depot option-set field to Birmingham and vice versa for the London Form.

Continue reading “Dynamically Render Different Portal Entity form depending on field Value”

Using Content snippets in javascript code on Entity Form Dynamics 365 Portals

In this post, I will be showing how to use a snippet in your javascript code. A powerApps Portal content snippet, using programming terms, is like a static global readonly variable that can be re-used anywhere within your code.

Create a content snippets in your PowerApps portals, make the type an HTML

Continue reading “Using Content snippets in javascript code on Entity Form Dynamics 365 Portals”