Sending an Input Variable and Getting an Output Variable from a Web API Action Call using Postman

In this post we will look at sending input variables and getting output variable responses from an Action in Dynamics 365 Power Apps called through the Web API using Postman. If you haven’t already, set up the Postman client and connect to Dynamics 365 / Power Apps. This can be useful in troubleshooting Web API calls. Under Processes, let’s create a new Action called OutputTest, of entity None (global): In … Continue reading Sending an Input Variable and Getting an Output Variable from a Web API Action Call using Postman

How to Set a Lookup Field to Another Lookup Field on a Dynamics 365 Power Apps Form using JavaScript

There may be cases where you need to set a lookup field on a Dynamics 365 / Power Apps form, where you want to default the value to another lookup on the form using JavaScript to default the field value. For example, on the Account form, we have the owner of the account (field OwnerId), and we have a custom field called My System User Field (new_mysystemuserfield) which is a … Continue reading How to Set a Lookup Field to Another Lookup Field on a Dynamics 365 Power Apps Form using JavaScript

Refreshing a Web Resource in Unified Interface with JavaScript (The New Way)

This post comes from a great find courtesy of an elite dev I work with who goes by “PV”. We had a requirement to reload / refresh an HTML web resource on a page when a user clicked into a tab to view it. This used to be reasonably straight forward in previous D365 versions and JavaScript – get the Web Resource using getSrc, set the Web Resource to null … Continue reading Refreshing a Web Resource in Unified Interface with JavaScript (The New Way)

Run JavaScript When User Clicks On Unified Interface Tab

In Dynamics 365 / Power App, we may want to “do something” when a user clicks on a form tab. Let’s look at how we can write a handler to invoke custom code. In our example, let’s look at the Account form. This form has multiple tabs – Summary, Project Price Lists, General etc. Let’s write code so when a user clicks in and out of the General tab, our … Continue reading Run JavaScript When User Clicks On Unified Interface Tab

How to Remove the Border around a Web Resource in Dynamics 365 / Power Apps

When a web resource is created in Dynamics 365 / Power Apps, we get a border defaulting around it. For example, below is a web resource on the Account form displaying “Hello World”. We see the border around the web resource: Even though we’re not doing anything specific in the web resource HTML: To remove the border, open the form in design mode and go to the Web Resource properties: … Continue reading How to Remove the Border around a Web Resource in Dynamics 365 / Power Apps

Showing an Error through JavaScript in Power Apps and Dynamics 365

When customizing model-driven Power Apps and Dynamics 365 with JavaScript, you may need to display an error to the user. One way to do this is to use Xrm.Navigation.openErrorDialog, which is called like below: Xrm.Navigation.openErrorDialog(errorOptions).then(successCallback,errorCallback); Let’s run it in browser Development Tools to show how it works. Open a Power App and in dev tools add the following code: Xrm.Navigation.openErrorDialog({ errorCode:”ABC7123″, details:”These are the details that will go into the … Continue reading Showing an Error through JavaScript in Power Apps and Dynamics 365

Using JavaScript to Add Spinner and Block UI in Dynamics 365 and Power Apps

In Power Apps and Dynamics 365, when writing custom JavaScript code, you may want to stop users from interacting with the user interface while your JavaScript code is processing. An example of this might be when a user clicks a custom button and some code runs, and while the code is running we want to display a “Processing” message until the code is complete. We can do this easily in … Continue reading Using JavaScript to Add Spinner and Block UI in Dynamics 365 and Power Apps

Create a Bot using Power Virtual Agents and Power Automate to Get Today’s Weather with No Code

The Microsoft Power Platform has exciting new capabilities with its Power Virtual Agents, used to build intelligent bots, and Power Automate, used to write no-code flows and integrations. What’s also exciting is the ability to call flows from bots in order to help bots answer questions and provide information to a customer/user. As I previously promised after the Ignite 2019 announcements, we will now look at how to create a … Continue reading Create a Bot using Power Virtual Agents and Power Automate to Get Today’s Weather with No Code

Checking out the Org Browser Canvas App in Power Apps

In Microsoft Power Apps, there is an Org Browser Canvas App which connects to your Office 365 data and enables the app user to search for Office 365 users in an organization. This can be convenient if you want to enable users to contact other users, especially mobile ones. Let’s take a look at it. To install it, go to https://make.powerapps.com and select Apps, then Org Browser: Give the App … Continue reading Checking out the Org Browser Canvas App in Power Apps

How to Set Button Icons in Unified Interface and Dynamics 365 Power Apps

Let’s say we want to set an icon for a button on a form in Power Apps / Dynamics 365. We will use the Ribbon Workbench to do this. Let’s add this to our Account form. First, create a solution and add the Account form: To add buttons to the Unified Interface, we will use SVG images. For the Web Client, we will use PNG images. There are online tools … Continue reading How to Set Button Icons in Unified Interface and Dynamics 365 Power Apps