Onit Documentation

Creating a Button to Execute an Action

by Michael Nadeau Updated on

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: View Pages or the App's Dashboard.

  • View Page Action Buttons: When clicked, these Buttons usually perform an Action on a single Record—the one the user is viewing.
  • Dashboard Bulk Action Buttons: These Buttons work in bulk, running the same Action on many different Records simultaneously. A user browses to an App’s Dashboard, selects all the Records on which they want to run the Action, 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 to advance a transaction to its next phase. First, we’ll configure this Button to be displayed and used on our app’s View Pages. Then, we’ll adjust its 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 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 to Closed action.

Click Save 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. You'll find it with the other Buttons if you click on a transaction. Select it to fire the Action associated with it, which, in this case, is advancing a Record to the next Phase.

Using a Button on the Dashboard

You'll need to make a quick change if you want your button to be used as a bulk action button on the dashboard rather than a transaction-specific button on view pages.

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

Previous Article Creating a Business Rule
Next Article Creating Raw Filters

© 2024 Onit, Inc.

docs.onit.com contains proprietary and confidential information owned by Onit, Inc. that is subject to copyright. Onit presents it exclusively to you for your sole use in conjunction with using Onit products. No portion of the materials contained herein may be used for any other purpose. No portion of the materials contained herein may be shared with third parties or reproduced in any form.