Archive
PowerApps – Create an ‘Account’ in Dynamics 365 from App using Flow
If you are new to PowerApps, please go through my previous blog
In this post, lets build an App with an Account Form and create the record in Dynamics 365.
Prerequisite:
- You must have a PowerApps account. Refer blog for details.
- Create a Microsoft Flow with logic to create an Account record in Dynamics 365
- Build an App and trigger Flow
Steps to create Flow:
- Login to PowerApps Portal
- Navigate to Business Logic -> Flows -> Create from blank
- In the new Flow screen, Choose Action, select ‘Dynamics 365’
- Select ‘Create a new record’ from Actions.
- Now we need to put place holders in the fields which we pass data from PowerApp.
- To add a place holder to ‘Account Name’ field, select the field, in ‘Dynamics content’ window, click on ‘Ask in PowerApps‘ button.
- A new place holder will get added to ‘Account Name’ field.
- I repeated the above step for ‘Main Phone’ and ‘Description’ fields.
- Rename the Flow to CreateAccount and Save
Invoke Flow from PowerApp:
- To know, how to create a new App and add controls to form, refer my earlier blog
- To trigger the Flow, select the ‘Create’ button, go to ‘Action -> Flows’
- From the ‘Data’ window, select the flow created in above section (i.e.,CreateAccount)
- On ‘OnSelect’ event of button, trigger the Flow ‘CreateAccount’ by calling ‘Run’ method and passing the 3 placeholder parameters.
- CreateAccount.Run(txtName.Text,txtDesc.Text,txtMobile.Text)
- Thats it, now its time to test the App
Test the App:
- Press F5
- Set the values and click ‘Create’
- Open the D365 App and you should see new ‘Account’ record.
Refer my earlier article to build an App using Excel as Data Source.
🙂
PowerApps – Error while connecting to Excel Data Source
If you are new to PowerApps, please go through my previous blog
In my last Post building, I explained the steps to build an App using Excel file as Data Source.
While I was exploring more with that App, I encountered an error when playing with different excel files.
Reason & Fix:
- If you have formulas defined in the Excel file, PowerApp will throw error as the PowerApps are not supporting Excel containing Formulas at this point.
- Fix was, I had to delete Formulas and keep only data in the excel file to run the App.
🙂
PowerApps – Build an App using Excel data as Source
If you are new to PowerApps, please go through my previous blog
In this post, I am going to walk you through building an App using Excel as ‘Data Source’.
I am going to build an App by
- Prepare an Excel file with data formatted as ‘Table’
- Place it in ‘One Drive For Business’.
Pre-requisites:
- You must have a PowerApps account. Refer blog for details.
- An Excel sheet with data formatted as ‘Table’.
- ‘One Drive For Business’ account
- This comes free with Dynamics 365 30 days trail.
Steps to configure Excel:
- Create an Excel file with some data. I prepared ‘Customer’ records with 4 columns.
- You should format this data as ‘Table’ as the PowerApp, only consider Tables, which you will notice in next sections.
- Provide name to the Table; We will use this Table name in ‘Power App’. I named my table as ‘Customers‘.
- Save the Excel
Steps to upload Excel to OneDrive:
- Login to http://portal.office.com
- Connect to ‘OneDrive’ and upload the Excel File
Steps to create App:
- Login to PowerApps Portal
- Create a New App with ‘OneDrive for Business’ template, as I uploaded the Excel to OneDrive.
- Note: Its not necessary that you should pick ‘OneDrive for Business’ template, you can even create a ‘Blank app’ and create ‘OneDrive’ connection.
- Click ‘Create’ to establish App’s connection with ‘OneDrive For Business’.
- Choose the Excel file
- Select the ‘Table’ and click ‘Connect’; This table ‘Customers‘ is nothing but the table name we given in ‘Excel sheet’.
- Now you would experience the power of ‘Power Apps’ as it instantly come up with UI using the excel data. App auto create 3 screens for Browse Screen,Details Screen and Edit Screen.
- You can reorder the columns by selecting ‘Data’ or you can change the ‘Sort Column’ if you want.
- Finally, press F5 to run the App.
Refer my previous blog to build a simple calculator App.
🙂
PowerApps – Step By Step – Build a simple Calculator App
In my previous article I detailed the steps to get started with PowerApps by signing up to the PowerApps portal.
Now, let me walk you through the steps to create and publish a simple ‘Calculator’ App.
The Calculator App will have 2 Text boxes and an ‘Operation’ dropdown. Upon clicking the ‘Calculate’ button, based on the Operation we either Sum or Subtract the values and show the result.
Pre-requisites:
- You must have PowerApps account. Refer my previous article
Steps to build ‘Calculator’ App UI:
- Connect to the PowerApp studio and click on ‘New App’ of Mode ‘Canvas’
- From the ribbon, click on ‘Insert’ tab and drag & drop the controls on to the Canvas
- For the ‘Text Input’ controls, select ‘Format’ as ‘Number’ so that it only allow digits.
- Add the ‘Dropdown’ control to the Screen
- To add “Sum”,”Substract” as options to the ‘Dropdown’, select ‘Items‘ property and set [“Sum”,”Substract”]
- Add the ‘Button’ control to the screen and set the text as “Calculate”
- Add 3 labels
- Label ‘A’, Label ‘B’ and Label ‘Result’
Steps to add the business logic:
- On buttons ‘OnSelect’ event,
- Declare a variable “varResult”
- Read the selected operation (i.e., Sum/Subtract) from the Dropdown
- Write an If/Else statement
- Add TextA, TextB; if the dropdown values is ‘Sum’ If(ddlOperation.Selected.Value=”Sum”,txtA.Text+txtB.Text))
- Subtract TextA, TextB; if the dropdown values is ‘Substract’ If(ddlOperation.Selected.Value=”Substract”,txtA.Text–txtB.Text))
- Set the Sum/Subtract value to the “varResult” variable using ‘Set‘ method
- Finally, we should display the result by setting it to ‘Result’ label. So, set ‘Text’ as ‘varResult’
Time to Test the App:
- Press F5 to test the App
Save and Publish the App:
Once you done with testing, its time to Save and Publish the App.
- To save the App, either press (Ctrl+S) or go to File -> Save
- Choose either ‘The Cloud’ option or ‘This computer’
- ‘Cloud’ option would save the App in your ‘PowerApps’ account
- ‘Computer’ option would provide the App in .zip folder to save locally.
- Post save, to make the App available to Users, click on ‘Publish’
Notes:
- PowerApps provides excel like formulas to apply business rules. Refer this blog to get exhaustive list of formulas.
🙂
PowerApps – Getting started
PowerApp is a service from Microsoft Business Application Platform (BAP) for creating business applications that can run in a browser or on a phone or tablet, and no coding experience is required.
Its a 3 step approach to create an App
- Connect to a Data Source; It can be your Dynamics 365, Azure SQL/SQL On premise, API, etc…
- Build the UI forms and add business logic using Workflows (i.e., Microsoft Flow, Azure Functions etc..)
- Publish the App
In this article, I am going to walk you through the steps to subscribe to Microsoft PowerApps and getting started with your first App.
Steps to connect to PowerApp Studio:
- Connect to PowerApps portal
- Click ‘Sign up free’ if you don’t have account already
- Note: You can sign in with your 30 days trail account, if you already have one.
- Click ‘Sign In’ if you have an account
- Once you login to the Portal
- Select ‘Apps’ from the Menu
- Choose ‘Design Mode’
- Canvas : This mode allows to create the app by dragging and dropping elements onto a canvas, just as you would design a slide in PowerPoint. This mode is apt if your requirement is to build a custom forms with rich UI.
- Model-driven: Model-driven app design is a component-focused approach to app development. Example of this mode is creating ‘Apps’ in D365.
- Click on ‘Create an App’ button
- Pick your App style
- If you are beginner, go with Canvas ‘Tablet Layout’
PowerApp IDE’s:
There are 2 ways to build the Apps
- PowerApp Studio – Web : In this option, you can build and Publish the App from the browser.
- PowerApp Studio – Desktop App: You can also download the PowerApp desktop application from Here
In the next article, lets see how to create a simple Calculator App.
🙂
Dynamics 365 – PowerApps
PowerApps is a service for building and using custom business apps that connect to your data and work across the web and mobile.
PowerApps enables power users in line of business roles to easily build and deploy business apps – without the time and expense of custom software development.
In this article, I am going to create a simple PowerApp which allows me to work with my Case records.
Step by step creating App:
- Subscribe for 30 days trail of Office 365
- After sign up, on the Home page, select “PowerApps”
- It will take to ‘PowerApps’ home screen.
- To create new App, click on “New app” and from the popup,
- If you have machine running on Windows 8 or Windows 10, Choose “PowerApps Studio for Windows” which will take you to Store to download the App
- Choose “PowerApps Studio for Web” to design in browser.
- I chose “PowerApps Studio for Windows” and downloaded the “PowerApps” from Windows Store
- After download, launch the “PowerApps” studio.
- As we are creating App to work with CRM Cases, choose “Dynamics 365” as your Data Source
- Choose the ‘Dataset’ as your Organization (Its “MS” for me)
- Choose the ‘Table’ as “Cases” entity and click on “Connect”
- Studio opens up the designer with default screens (i.e.,Browse, Details, Edit) for Case’s records.
- You can add/remove fields or icons on the screens or create a new screen.
- Once the design completes, click “ File -> Save” to save the App
- I saved the App as “My First App”
Run the App:
- Go to PowerApps home screen and select the App to run.
- Click the App and it will run and pull the Cases from my Dynamics 365 organization.
Share the Power App:
- Also, App can be shared across the Organization or to specific Users.
- Select the App and click on ‘Share’ option
🙂