Microsoft PowerApps, Microsoft Flow, SharePoint and Dynamics 365 working together, No coding required!!

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:

  1. IT team of an organization uses Microsoft SharePoint(Office 365) for tracking company equipment loaned to it’s employees and for managing them. They use a SharePoint list for tracking these loaned equipment.
  2. Let us say the HR team of the organization wants to have visibility into the details of the equipments which are loaned to the employees, within the ERP system of the organization, which is Dynamics 365 for Finance and Operations in this case.
  3. Also, 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 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 ūüôā

Loaned Equipments Sharepoint

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.

App from Sharepoint

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.

PowerApps screens

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.

OnStart Formula

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.

Filter Items1

 

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.

FlowFrom List

Flow email

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.

Insert A powerapp

Insert A powerapp2

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.

FlowFrom List

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.

Launch PowerApp

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

Aaron Equipment

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

Aaron Equipment detail

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.

Adam Equipment detail

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.

Add new equipment

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

Add new equipment1

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.

Record added to SP

RecordAdded for Adam

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,

  • 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. (Got to test this out at some point :))
  • 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 many more….

That’s it for today’s post. Till next time…

-Sandeep

Advertisements

The Common Data Service(CDS) and Prospect to Cash integration between Dynamics 365 For Sales and Dynamics 365 For Finance & Operations

Dynamics 365 as a platform has so much to offer for your organization. Be it, best in class Talent management, Sales & Marketing, Customer Service management, Field Service, Project Service automation(PSA), Retail, Finance & Operations management, Microsoft Dynamics 365 offers purpose built apps for each of these areas for organizations of any size, ranging from 5 – 10 employees to large enterprise organizations with 10,000 + users.

All D365 Apps

Any Tier 1 cloud ERP in the market today will probably provide you pretty much the major functionalities, that you would expect for your organization. However, what sets Microsoft Dynamics 365 apart from the crowd, is the platform itself. Along with purpose built, best-of-breed apps and functionality for all areas of your businesses, you also get the tools, services, technology and the best of Microsoft cloud. A few to name are,

  • Common data Services for integrating business apps seamlessly.
  • Microsoft PowerApps to build mobile apps and extend business processes easily with minimal or no coding needed .
  • Microsoft Flow to automate¬†routing, approvals, event based actions and notifications etc.
  • Power¬†BI for incredibly stunning data visualizations and data intelligence.
  • Microsoft Azure technology stack, such as Azure functions, Artificial intelligence, Machine learning and much more.

Probably, no other business application platform provides this breadth of technology and functionality that Microsoft Dynamics 365 provides today.

In my last post, I explained the Common Data Service and the capabilities, what is coming etc. In this post today, I will share some of my findings of testing of Prospect to Cash integration scenarios between D365 Sales and D365 Finance & Operations.

One of the most common requirements of every ERP implementation is the integration of the Sales and marketing application with the Finance and operations application, to exchange business data such as Customer accounts, contacts, quotations, sales orders, products, invoices and more, so that the respective team members from different teams can get a 360 degree view of the customer’s data. The Microsoft Common data service aims to make it possible to integrate Dynamics 365 For Sales and Dynamics 365 For Finance and Operations out of the box, with various data project templates readily available for use.

Why Common Data Service?

You may argue why use Common Data Service to build integration between the apps/services  Vs. just leveraging OData Service or even Customer services (REST/JSON). Sure, you can always leverage either OData Service or the Custom Services to build your integrations between D365 for Operations with other Dynamics 365 or other 3rd part services if you feel more comfortable with that approach. However, leveraging the CDS will give you advantages such as, voiding significant investments in writing custom integration that you need to maintain at a cost. Additionally surfacing business data from multiple business applications of your organization into CDS provides you the capability to create mission critical business intelligence using Power BI or even build custom apps with ease leveraging PowerApps.

Connection Sets in CDS:

Connection Sets defines what apps/services/systems you are going to connect for data exchange.

In PowerApps Admin center, I have already created my Connection Set, that establishes connection between my D365 For Sales and D365 For Finance and Operations apps. I also have done the Organization(s) mapping between these two apps, so that my data will surface in the required entities/organizations. Screenshot below shows the Connection set I have established. This is the first thing you need to setup, before you actually setup the data integration projects.

Connection Set

Data Integration projects in CDS: 

The Data integration projects defines what entities are being integrated/synced between the two apps defined in the Connection set. It contains the following information.

  • A template of the project (Predefined list of Data integration projects provided by Microsoft). Note: Currently, when you create a new data integration project, you are required to select a predefined template. This might change in future, where you can create your own mapping.

DataIntegrationProjects

  • Connection Set: Select the connection set you want to use within the data integrator project.

ConnectionSetInDataIntegrator

  • Organization Mapping: Since you could define more than one organization mapping within one connection set, you will can select a organization mapping that is applicable for the data integrator project.

DataIntegratorOrgMapping

  • Tasks: The data from the source app (D365 For Sales ) flows through the Common Data Service(CDS) to the Destination app(D365 For Operations). The tasks under the project contains the individual data field mapping between the entities in source app, CDS and destination app. It also contains the information such as how frequently the project should run (Manually Vs in Batch).

TaskDataMapping

DataIntegrationProjectRunSchedule

DataMapping

A default task comes automatically when you use a template to create a data integrator project, however, you can add your own tasks to the project, where you can map additional entities.

NewTaskUnderProjectCDS

 

Now that the Data Integrator Project and the Connection sets are configured, let us see how the Customer account data automatically flows from D365 Sales to CDS and then from CDS to D365 For Operations. In this case, I will just run the project manually ( I could set it to run automatically also)

Below screenshot shows the new customer I have setup in D365 For Sales.

NewCustomerInD365FroSales

I ran the data integrator project now manually in CDS admin center. In an ideal scenario, you would set it up to run automatically.

RunDataProject

When the project run successfully , you can see the detailed execution history which will tell that the data got successfully transmitted from source to destination (D365 Sales to D365 For Operations in this case). See screenshots below. This execution log helps you identify issues with data sync if any and take necessary actions.

Execution History1

Execution History2

Now that the execution happened successfully, let us go verify if the Customer account got successfully created in D365 For Operations.

D365CustomerAccount1

D365CustomerAccount2

This was my testing just for one scenario of passing Customer account data from D365 from Sales to Operations for this blog post. There are other templates that addresses the full picture of Prospect to cash scenario(See screenshot below) such as syncing,

  • Contacts from Sales to Operations
  • Products Operations to Sales”,
  • Quotes from Sales to Operations
  • Sales orders from Sales to Operations
  • Sales Invoice details from Operations to Sales.

IntegrationTemplates

I am continuing my testing of all these other entities to see how the overall data flow looks between Sales and Operations. I will share results and findings later ūüôā

A few important Notes (Just my thoughts) about these out of the box integrations in D365  using Common Data Services:

  1. The Common Data Service platform seems to be very promising and is absolutely the right step in the right direction for enabling integrations and extension scenarios for Dynamics 365.
  2. With all honesty, CDS platform and functionality is fairly new and we are seeing new capabilities being added frequently. At this point, I have some important questions such as the below, for which I have still trying to get answers . I certainly need to learn more.
    • How does data updates/modifications/deletions sync.
    • Why do I need to select a template always to create a new data project.
    • What about notifications on execution history/results.
    • What happens to Bi-directional data update for an entity.
    • what is the data size/volume limitations for the Data integrator.
  3. I am also not very clear on the data security management of CDS . It looks like there are security roles and permissions that Microsoft provides in CDS, but looks like this needs to mature more.
  4. Right now, it seems like you can connect only Azure based services/apps. I don’t know how this will work with non-azure/external apps/services. At least, I have not tried yet.
  5. In my view, it does not look like the out of the box integration is ready for prime time, that customers can simply deploy and get going smoothly without issues. This will change significantly for sure in the months to come, when more features are released and bug fixes are out. I would imagine by the Fall of 2017, we should see a much robust out of the box integration using the CDS.
  6. Customers who are flexible to adopt the platform with a long term vision for success, can adopt the CDS integrations right away and go through the process of learning and will certainly get return on the investments in long term.