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”

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”