There are many repetitive tasks that we all probably wish we could run with just a tap of a button. For example, you may need to quickly email your team to remind them to join a daily team sync.
Button flows allow you to accomplish these and many other tasks simply by tapping a button on your mobile device. These button flows are also referred to as instant flows.
In this example, let's create a button or instant flow that creates a new customer in Business Central every time when you tap a button.
To start the process, select Create in the menu and click the Instant flow tile.
In the new screen, fill in the Flow name and as a trigger select Manually trigger a flow, then select Create and follow these steps.
Select the trigger, click +Add an input, and complete the following steps.
Select the Text icon.
Enter Number as a value in the first field and click +Add an input.
Add Company name as a value in the Text field and click +Add an input.
Repeat the previous steps for the Address, Phone number and E-mail fields.
Click +Next to add an action.
Add the Business Central connector in the Search connectors and actions field and select the Create record action. With this action, you can insert values entered in a previous step to a Business Central table you'll choose in the next step.
In the Business Central - Create record action, enter the following values.
In the Environment name, select PRODUCTION (or SANBOX if you are doing a test) and select the company you will use in the Company name field.
Enter customers in the Table name.
In the number field, enter Number from Dynamic content.
In the displayName field, enter Company name from Dynamic content.
In the type field, type Company.
In the address street field, enter Address from Dynamic content.
In the phoneNumber field, enter Phone number from Dynamic content.
In the email field, enter E-mail from Dynamic content.
When above data are configured, you can save the flow. You might want to add one more action that notifies when the customer is successfully created. To do this, click +Next step and add the following configuration.
Add a Notification as the next action and select Send me a mobile notification as an action.
In the Text field select displayName from Dynamics content and add the following text: 'was successfully added as a new customer to Business Central!'
Click Save to save this flow.