All of you who attended the Microsoft Inspire and Las Vegas this year and the Microsoft Business Sumit at Seattle, would have heard a lot about the Microsoft Power platform. All the surrounding apps and services in Dynamics 365, such as Microsoft PowerApps, Flow, PowerBI, CDS etc. now are referred as the new Power platform.
In today’s blog post, we will see how all these powerful services puts the real power in the hands of the super-users of the systems and enables them to create seamless business process automation between applications such as Office 365, Microsoft SharePoint, Dynamics 365 and others, without requiring to write a single line of code.
The Scenario and the requirement:
How do we do this?
The First component of the whole scenario is the SharePoint list that IT team uses to process and keep track of loaned equipment to the company’s employees. So just create a very simple Share point list with some basic data fields as shown in screenshot below.
I am not explaining the details of how to create the SharePoint list. All of us know it
The Second component of the scenario is building the ability for the HR team to be able to see the details of these loaned equipment for each employee from within the ERP, which is Dynamics 365 for Finance and Operations(Referred as D365F&O from here on).
Let’s build this.
D365F&O provides the ability to embed Microsoft PowerApps into the forms directly and we will leverage PowerApps to extend the User interface of D365F&O, without requiring us to code and customize a new forms and underlying business logic. So we will first build a PowerApp from the SharePoint list we have for loaned equipment tracking.
To create the app, you can either initiate the App creation directly from within the SharePoint list, or you can just create a blank PowerApp within PowerApps online and the Connect to data and select the SharePoint list and list. Both will do the same thing for you.
Screenshot below shows the app I have built from my SharePoint list. I am using the 3 default screens, Browse, Details and the Edit screen.
Since we need the HR team members to be able to see the loaned equipment details for respective employees, we will need to establish the context relationship between D365F&O and the PowerApp and the SharePoint list. In this case, I will use the Unique Personnel number/Employee ID field of D365F&O to build this relationship.
When the PowerApp launches and starts within D365F&O, we need D365F&O to pass the Personnel number of the selected employee record to the PowerApp, so that it can look for the corresponding loaned equipments for that employee and show the results. To accomplish this, we will use the standard formula on the On Start action of the PowerApp’s main Browse screen. See screenshot below.
The formula to use on the On Start action of the PowerApp: If(!IsBlank(Param(“EntityId”)), Set(FinOpsInput, Param(“EntityId”)), Set(FinOpsInput,””))
Note: FinOpsInput here is the global variable that PowerApp will use to receive the input data from D365F&O. The above formula is just a standard formula and you can use it as it is. You can name the global variable whatever you want.
Next, we will need to tell the PowerApp how to filter the data from the SharePoint list, based on the context /input data it receives from D365F&O. The input field in my case is the Personnel number of the employee. To do this, you can just use the simple Filter function of PowerApps on the BrowseGallery of the app. This filter will take the FinOpsInput global variable as the criteria. See the screenshot below.
The next component of this requirement is, sending the email notification when an asset is added by HR team from within D365F&O into the SharePoint list. We will leverage Microsoft Flow for this. You can simply build the flow directly from the SharePoint list and the flow will be just basic, where it will send an email to one or more persons after a new item has been added to the loaned equipment list. Screenshot below shows the flow i have built for this.
The Final component is embedding our PowerApp into the Employees form in D365F&O. This is very straight-forward. Just go to the Employees form and click on the Insert a PowerApp button. You can insert PowerApp on other locations of the form such as under a fast tab, or even as an action pane menu button. On the next screen, you can enter a name/label for the app, and then specify the App ID of your PowerApp (You can get the App ID from the app details within Powerapps online). Lastly, you will select the input data field that you want to pass into the app. The screenshot below shows this setup i have done.
With that, we have now built all the main components for accomplishing our requirement. Let us see this in action now.
The IT team has the SharePoint list for the loaned equipment tracking and i am not demonstrating how they will use it. It is just standard SharePoint functionality. I have loaded some data already to show in this demo. As you can see in screenshot below, the list has 2 Equipments loaned to Aaron, 1 to Adam and 1 to Adriana.
The real fun starts here. Now the HR team logs into D365F&O and navigates to Human Resources > Employees.
They can see the Loaned Equipments PowerApp button right there.
When clicked, the PowerApp will launch and show the loaned equipments list for the employee record they have selected. In this case they have selected Aaron Con, so they see the equipments loaned to him..
They can click on an asset to see the further details. All of this data is coming in real time from the SharePoint list.
When they want to see the Equipments for another employee, they will select the employee and the PowerApp will show the respective Equipments. To prove this, I selected Adam Carter and you can see the Equipments for him now.
Now, let us say there is a scenario, where HR wants to update some comments on an existing equipment record or they want to create a new equipment record for Adam Carter from within D365F&O. We will see how they can do this and how the PowerApp will write the data back to the SharePoint list.
Selecting Adam’s worker record, the HR person clicks the New button on the PowerApp.
Then they fill in the required details of the equipment. Let us say they want to add a new Samsung monitor for Adam.
After they successfully add the new equipment, the data will sync back to the SharePoint list via the PowerApp and it can be seen on the PowerApp after refreshing the list.
Finally, when the record has been added to the SharePoint list, my flow will trigger and send the email notification to required persons. I am not able to demonstrate this here since there are some data policies setup on the tenant that is blocking my flow, but it is very straight-forward. You can refer to my earlier blog post on Microsoft flow to know how this works.
So, with literally no coding required, we were able to leverage the Microsoft Power platform (Powerapps, Flow) and we connected data between SharePoint and Dynamics 365 and were able to see relations based data between the 2 systems. THIS IS VERY POWERFUL indeed !!!
I just made up this sample scenario for my post,but think of the possibilities with these. You can extend D365F&O functionality and automate business processes around everything. What if,
That’s it for today’s post. Till next time…