Microsoft PowerApps, Microsoft Flow, SharePoint and Dynamics 365 Working Together, No Coding Required!

Microsoft PowerApps, Flow, Power BI & CDS can now seamlessly connect & automate processes between Office 365, SharePoint & Dynamics 365.

Table of Content

    All who attended Microsoft Inspire in Las Vegas and the Microsoft Business Summit at Seattle this year would have heard a lot about the Microsoft Power Platform. All the surrounding apps and services in Dynamics 365, such as Microsoft PowerApps, Flow, Power BI, CDS, etc. now are referred as the new Power Platform.

    These powerful services put significant power in the hands of their super-users 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.

    Scenario & Requirements: When Would I Use the Microsoft Power Platform?

    1. If the IT team of your organization uses Microsoft SharePoint (Office 365) for tracking company equipment loaned to it’s employees and for managing them and they use a SharePoint list for tracking these loaned equipment.

    2. The HR team of your organization wants to have visibility into the details of the equipments which are loaned to the employees, within the ERP system of your organization, which is Dynamics 365 for Finance and Operations in this example.

    Enabling the Modern Worker with the Microsoft PlatformEnabling the Modern Worker with the Microsoft Platform

    3. Let’s say there is also a requirement, where the HR team wants to be able to edit or add new loaned equipments for employees, from within Dynamics 365 for Finance and Operations ERP application.

    4. Finally, when they are done with adding new loaned equipment for employees from within the ERP, they want an email notification to be sent to certain parties.

    How Do We Do This?

    The first component of the scenario is the SharePoint list that the IT team uses to process and keep track of loaned equipment to the company’s employees. To start, just create a very simple SharePoint list with some basic data fields as shown in screenshot below.

    SharePoint listThe second component of the scenario is building the ability for the HR team to be able to see the details of the loaned equipment for each employee from within the ERP, which is Dynamics 365 for Finance and Operations (referred as D365F&O from here on).

    1. Build a PowerApp

    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 the 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 create a blank PowerApp within PowerApps online and then connect to data and select the SharePoint list. Both will provide the same results.

    Create an app in SharePoint

    The 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.

    Building apps from SharePoint lists


    2. Filter the Data

    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 this example 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 as you can see in the screenshot below.

    Filtering data from SharePoint lists

    3. Send the Email Notification

    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.

    Simply build the flow directly from the SharePoint list, where it will send an email to one or more persons after a new item has been added to the loaned equipment list. In the screenshot below you will see the flow i have built for this.

    Microsoft Flow in SharePoint

    Microsoft Flow email


    4. Embed Your PowerApp into the Employees Form

    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 the 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 as shown in the screenshots below.

    Inserting a powerapp into employee form

    Inserting a powerapp in Dynamics 365


    We have now built all the main components for accomplishing our requirement.

    The Right Microsoft Partner Can Drive Business SuccessThe Right Microsoft Partner Can Drive Business Success

    Now, Lets See It In Action

    Please note, the IT team has the SharePoint list for the loaned equipment tracking and this is not a demonstration of how they will use it — it is just standard SharePoint functionality.

    As you can see in screenshot below, the list has 2 Equipments loaned to Aaron, 1 to Adam, and 1 to Adriana.

    SharePoint flow from list

    Now the HR team logs into D365F&O and navigates to Human Resources > Employees.

    They can see the Loaned Equipments PowerApp button right there.

    Loaned equipments PowerApp button

    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.

    Launching loaned equipment lists with PowerApps

    They can click on an asset to see the further details. All of this data is coming in real time from the SharePoint list.

    SharePoint real time asset details

    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’ve selected Adam Carter and you can see the updated Equipments for him below.

    PowerApps employee equipments

    Updating Existing Records

    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.

    Adding new equipment to a record in PowerApps

    Then they fill in the required details of the equipment. Let us say they want to add a new Samsung monitor for Adam.

    PowerApps adding new equipment to worker record

    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.

    Updating SharePoint lists with new equipment

    Adding worker records in Dynamics 365

    Finally, when the record has been added to the SharePoint list, the 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 block the flow I’ve setup, but it is very straight-forward. You can refer to my earlier blog post on Microsoft flow to learn more about this.

    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. As a result, we were able to see relations based data between the 2 systems. A powerful capability indeed.

    I just made up this sample scenario for my post, but think of the possibilities with these connections. You can extend D365F&O functionality and automate business processes around everything. For example:

    • You can create a Smart Bot using Microsoft QnA Service maker, use PowerApps to connect to the QnA service using Custom API and custom connector and build a PowerApp for the Q&A interaction with users. You can then embed this PowerApp in D365F&O (for example on the Vendor self-service portal) to make it easy for vendors to get answers to their questions in a bot chat interface.
    • You can create a PowerApp to create shipping labels and pass the delivery address from D365F&O to the app to generate shipping label
    • You can have tracking number of sales orders and build a PowerApp to build a package tracker (Microsoft uses this for demo purposes).
    • You can create a PowerApp to create product labels, QR codes and pass Product ID from D365F&O to generate that.
    • And much more….

    That’s it for today’s post and if you’re interested in all the other features of Power Apps, click here to learn more.

    Business Leader's Guide to RansomwareBusiness Leader's Guide to Ransomware


    About Sandeep Chaudhury

    Sandeep Chaudhury is a Dynamics AX enthusiast with over 10 years of experience in functional consulting, Solutions architecture and systems integration, with expertise in the areas of Professional services automation (Project Management and accounting), Financials Management, Services Management, Sales and Marketing, Human resource management, Travel and Expenses Management and Procurement & Sourcing modules of Microsoft dynamics AX ERP. He has experience working with the new Dynamics AX (AX 7), AX 2012 R3, AX 2012 R2 and more.

    Essential Guide for the Modern Professional Services FirmEssential Guide for the Modern Professional Services Firm