In this post we will try to achieve a way to create new “contacts” records in Dynamics 365 CRM with the help of Microsoft Flow connector.
Learn more about our Microsoft Dynamics 365 Services
With the help of Microsoft PowerApps, we can build the apps that run on browser, tablets and on smartphones. PowerApps has three most important additives:
- Canvas Apps
- Common Data Service
Steps to Create Dynamics 365 record from PowerApps using Microsoft Flow
Step 1: Login to PowerApps using https://web.powerapps.com/home.
Step 2: Now Go to Apps > Create an app and click on Canvas.
Step 3: After that it will ask for the selection of canvas. Here we will select from the Blank app and Phone layout.
Step 4: Now we will add Textboxes, Labels and Button on the canvas.
Step 5: Now Go to Action > Flows > and click on Create a new flow.
Step 6: In the next step, it will take us to the flow with the same credential as the one used in the PowerApps site. Now click on New Step as shown in the image below:
Step 7: In the next step, it will ask for the Flow connector that will be used for data connectivity. We will search action and select Create a new record.
Step 8: In this step, we will select the Organization Name and Entity Name that we want to utilize to save the record. In our scenario, we will select the contact.
Step 9: After selection of our entity, it will show us a full list of fields that are available in our Contact entity.
Step 10: In this step, we will map the fields that we have in the PowerApps Canvas to the fields that are available in the list using Dynamics content selection as shown in image below.
Step 11: After completing the mapping we will now save the Flow so we can utilize it in our PowerApps. Click on Save.
Step 12: Now our created Flow will be shown in the list and we can utilize it for Data connectivity with Dynamics 365 org on which we need to perform the operations.
Step 13: We will trigger the Flow on the Click of Button. To call this we will use following expression on the OnSelect function of the button.
“PowerAppsbutton.Run(txtLastName, txtFirstName, txtLastName)”.
Step 14: After completing we will click on the Run button for the PowerApps to test.
Step 15: In the next step, once we click on the Run button, we will see the apps screen. Fill the field with our desired values and click Save, and then we can verify it from Dynamics 365 CRM.
Step 16: In this step, we will save our PowerApp.
Step 17: We can also share PowerApps with any user that we want to.
Step 18: After successfully saving we will see the screen below and from there we can click on the highlighted link to open our PowerApps.
Step 19: Once we click on the link it will open our PowerApps. As shown in the image below:
Step 20: After saving the record we will verify it in Dynamics 365 CRM. We can see both records that we created during the test run and the one which is highlighted is the one we just created.
Explore our Microsoft Dynamics 365 Services
Hope this will be helpful.
We have created a basic Canvas PowerApps from scratch by utilizing Microsoft Flow as a connector to create records in Dynamic 365. If you have any question or queries, do not hesitate to reach out to us!