Posts

Showing posts from June, 2021

Calling a D365 web service from a Power App

Image
Here is a guide on how one can utilize a Powerapp to call a D365FO custom web service. Please see my post Lets make a service if you need a guide on how to make a custom web service. In power apps there are no built in way to do this directly, as I understand you need either to create a custom connector or call the web service through a Flow. In this post we will concentrate on the use of a Flow. Crate a Power app Begin by creating a blank power app. Add some controls similar to the image below, consists of a label, input text button and a label at the bottom. You now have a basic screen to enter information and pass to your web service. Now we need to declare a variable, in the menu on the left, select your App and change the event to OnStart .  In the formula input box declare a variable and notify a label of text change.  Set(SearchResult, "Enter product ID and press search"); Notify(ResultLabel.Text) Select your label to display the results (in my case ResultLabel ) and

Calling a D365FO Web Service from a Flow

Image
 Here is a guide on how to call a custom Web Service in D365FO from a Flow. To call a Web Service you need to gain access by retrieving an access token and pass that token in the header of your call. If you do not have a web service or you want to follow this example, you can download this file and import into your development environment, also you can  view this post to see how a web service is made. Create your flow Begin by creating your Flow by selecting a template, since I make this flow in relation to my PowerApp post, I will choose the Power Apps button template.  Basic Flow steps These are the basic steps that you need to call a web service, you can of course do it a whole set of different ways, like use Azure Keyvault or passing parameters instead of hard coding [like I've done here]. Quick explanation: *Variable, I just hardcoded this, you might choose different approach. Called by a power app.  initialize variables: TenantID* ClientID* Web service URL* ProductID, (inpu