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”

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”

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()”

Dynamics 365 API updates

With the wave 2 Release update came a number of updates to the dynamics SDK, 3 major updates caught my attention :

  • Formerly Xrm.Utility.getGlobalContext().userSettings.securityRoles is now Xrm.Utility.getGlobalContext().userSettings.roles
  • Xrm.Utility.getGlobalContext().userSettings.transactionCurrencyId is now Xrm.Utility.getGlobalContext().userSettings.transactionCurrency

Before the update, Xrm.Utility.getGlobalContext().userSettings.securityRoles returns

Continue reading “Dynamics 365 API updates”

Posting images to Azure Blob storage From Dynamics using Canvas App

In this article, we are going to upload Account entity images to azure blob storage.

Prerequisite needed to implement the requirements in the post are:

  • You should an azure blob storage account up and running. you can follow this microsoft post on how to create one here
  • You should know your way around canvas App studio
  • Access to dynamic 365 instance.
Continue reading “Posting images to Azure Blob storage From Dynamics using Canvas App”

Read Data From Azure function request body from webhooks call Using Dynamics 365.

In this blog post, I will assume you know how to create an Azure function, publishing the function using visual studio and registering a webhook against the function. For more information regarding creating a function and calling the function’s endpoint, click here.

There are lots of blogs on calling azure functions using the plugin registration tool, but just a few dive in deeper about accessing the request body data in the azure function itself, so this blog post is about solely accessing the request body and retrieving the specific data you want. In this example, we want to retrieve data from an account record in dynamics, when it is created.

Continue reading “Read Data From Azure function request body from webhooks call Using Dynamics 365.”