“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”

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”

Using the Http Request connector in Power Automate

Trying to expose records in dynamics to an external? , we can achieve this using power automate. In this example, the Power automate flow  will look like this :

The first trigger is “When a HTTP request is received” , create a sample schema and make the method post. A url is generated, this is the url we would call a POST method using postman:

Continue reading “Using the Http Request connector in Power Automate”

Sending Adaptive card to Microsoft teams, to create D365 Record using Power Automate

I have been developing teams lately, one interesting functionality I came across is Adaptive Cards. Adaptive cards can be used with Android, iOS, JavaScript etc, in our example, I will be using adaptive card to collect information about a trip via power automate, to create CDS records.

In the docs, which can be found here , Adaptive cards “are platform-agnostic snippets of UI, authoored in JSON, thats apps and services can openly exchange”

Continue reading “Sending Adaptive card to Microsoft teams, to create D365 Record using Power Automate”

Multiselect entities in a lookup control using Xrm.Utility.lookupObjects()

You can get the requirement to lookup multiple entities and do something with the selected lookup values. Well search no more, the Xrm.Utility.lookupObjects() Api method would meet such requirement .

I have loaded the below code to trigger on the change of a field. The lookup entities in the below is Contact and Account (it could be a custom field).

Continue reading “Multiselect entities in a lookup control using Xrm.Utility.lookupObjects()”