While Onit Apps are pre-configured with a few standard Buttons out-of-the-box, an App creator can also create their own custom Buttons. While there are different types of Buttons that you can create, in this tutorial we’ll explain how to create Action Buttons, which are helpful if your App’s users need to run an Action ad-hoc.
For example, you might want users to run a Generate Spreadsheet Action on a Record whenever they want. If so, you can create a Button that fires this Action.
Action Buttons can be configured to display in one of two places: on View Pages or on the App's Dashboard.
- View Page Action Buttons: When clicked, these Buttons usually run an Action on a single Record -- the one that is currently being viewed by the user.
- Dashboard Bulk Action Buttons: These Buttons work in bulk -- they run the same Action on many different Records at the same time. A user browses to an App’s Dashboard, selects all of the Records that they want to run the Action on, and then clicks the Button.
An Action Button can optionally accept a Condition that will affect if and when the Button displays. For example, you could create a Condition that only displays a Button to a certain type of user (e.g., only Managers).
Before We Start ...
This tutorial will assume you understand the following concepts:
Let's Get Started!
In this tutorial, we’ll create an Action Button that will advance a transaction to its next phase. We’ll first configure this Button to be displayed and used on our app’s View Pages. Then we’ll adjust this Button’s settings to display it instead as a Bulk Action Button on the Dashboard.
1. Browse to Buttons
Browse to the Advanced Designer page. From the left-hand pane, select the Buttons node.
2. Add an Action Button
From the Add dropdown, select Action Button.
3. Configure the Button
Provide your new Action Button with a Name and a Display Name. They can be the same.
Next, link your Button to an Action that you’ve created by selecting it from the Action dropdown. You can additionally choose to provide a Condition in the Condition dropdown, which will affect when the Button will display.
In this tutorial, we're linking our Button to a Change Phase Action to advance Records to the next phase.
Click OK to save your new Button.
You also have the option to configure a Prompt to save changes flag when a user clicks the button. When this flag is checked and the user is in edit mode, they will receive a prompt to confirm before the action is executed.
Using a Button on View Pages
This Button is ready for use on transactions' View Pages. If you jump over to a transaction, you'll find it with the other Buttons.
Select it to fire the Action associated with it, in this case advancing a Record to the next Phase.
Using a Button on the Dashboard
If you want your Button to be used as a Bulk Action Button on the Dashboard rather than as a transaction-specific Button on View Pages, you'll need to make a quick change.
Return to your Action Button in the Advanced Designer.
Select the Bulk Action property.
Be aware that Conditions will affect a Bulk Action Button differently than a View Page Action Button.
Save your Button by selecting OK.
Your Button will now appear on the Dashboard. However, the Button won't be active until one or more transactions is selected.