Dynamics 365 – Hide/Disable/Edit Business Process Flow Fields using JavaScript

In Dynamics 365, Business Process Flow attributes are just like Form attributes. You can use most of the controls in the same way as you normally do for Form attributes. Let's look at the most common ones together. Get Business Process Flow attribute control using Javascript To get attributes Add "header_process" before schema name of … Continue reading Dynamics 365 – Hide/Disable/Edit Business Process Flow Fields using JavaScript

Dynamics 365 – Call Power Automate Flow from JavaScript

In this post I will show the steps to call Cloud(Power Automate) flow from Javascript. I will send a JSON request body to my flow and get a JSON response body back. We will do that in 3 simple steps. Let's start. Step 1 - Create a Power Automate Flow Go to https://make.powerautomate.com/ and choose … Continue reading Dynamics 365 – Call Power Automate Flow from JavaScript

SharePoint Online API – Get Access Token with Client ID and Secret – Part 2

In Part 1 of this post we created our SharePoint add-in and added permissions to it. We now can start using the SharePoint Online API. With using PnP Framework library Add the PnP Framework library nuget package to use the below code: https://www.nuget.org/packages/PnP.Framework https://gist.github.com/furkankaracan/5e400400e20dba153f8423e276ef9d2e With using Postman appReg_clientIdYour SharePoint add-in Client IDrealmYour SharePoint Tenant IDprincipal00000003-0000-0ff1-ce00-000000000000targetHost<domain_name>.sharepoint.com With … Continue reading SharePoint Online API – Get Access Token with Client ID and Secret – Part 2

SharePoint Online API – Get Access Token with Client ID and Secret – Part 1

With Microsfot leaving basic authentication behind it is unsecure to use username and passwords anymore. Authentication with Client ID and Secrets is the suggested and secured method to use. We will look at how to do this for SharePoint Online API. First we will register an app on SharePoint site, use its ID and Secret … Continue reading SharePoint Online API – Get Access Token with Client ID and Secret – Part 1

Dynamics 365 – Switch Forms Dynamically by Using JavaScript | formselector

In CRM it is common that showing different forms to different user gropus. There might be some conditions that you check to switch and show different forms to users. For cases like these, formSelector() and navigate() functions save the day. formselector.items collection: A list of all the forms accessible to the current user. Only those forms … Continue reading Dynamics 365 – Switch Forms Dynamically by Using JavaScript | formselector

Dynamics 365 – How to Show/Hide Sections and Form tabs

Just like attributes, tabs and sections are also controllers of the forms in Dynamics 365. You can apply same logic to show and hide those controls by using Javascript. For the tabs; you need to know unique name of the tab you are going to show/hide.For the sections, you need to know unique name and … Continue reading Dynamics 365 – How to Show/Hide Sections and Form tabs

Dynamics 365 – Share-Unshare Records with Plugin or Custom Workflow Activity by using C#

In Dynamics 365, you can dynamically change access privileges of users or teams to records by using Plugins or Workflows. There could multiple scenarios you can implement such functions. For instance, when creating a new Record you can share that record with a specific team or user by using GrantAccessRequest message. Again, on changing of … Continue reading Dynamics 365 – Share-Unshare Records with Plugin or Custom Workflow Activity by using C#

Dynamics 365 – Different Ways of Showing Form Level Error Messages – setFormNotification | setIsValid

Form notifications are useful when you want to prevent the user saving the form if the form fields do not meet the conditions. Say you have 2 date fields called "Start Date" and "End Date". You want the records can only be saved if the "End Date" is bigger than the "Start Date". You have … Continue reading Dynamics 365 – Different Ways of Showing Form Level Error Messages – setFormNotification | setIsValid

Dynamics 365 – How to get and use formContext

The formContext is a part of executionContext and it replaces deprecated Xrm.Page starting from Version 9. Xrm.Page object was used to represent a form or an item on the form. With the latest version, the Xrm.Page object is deprecated, and you should use the getFormContext method of the passed in execution context object to return reference to the appropriate form or … Continue reading Dynamics 365 – How to get and use formContext

Dynamics 365 – How to Trigger OnChange Event of an Attribute

fireOnChange() function is used to trigger the registered onChange events of an attribute. It is also very useful when you update an attribute through Javascript Code and it onChange event doesn't trigger. When you update an attribute from Javascript code, its onChange event doesn't trigger. If you want it to be triggered, you have to … Continue reading Dynamics 365 – How to Trigger OnChange Event of an Attribute