Jump to content

Button Click

From Resco's Wiki

Rules are client-side scripts (no-code business logic) that are executed when a user of the mobile app interacts with the app. The Button Click rules are executed when a row button is clicked. Rules are managed using the rules editor, usually in Woodford.
Button Click rules are available on the:

Example: create a new order or appointment

These two examples, showcase custom buttons on the account form.

First, we click Add button and fill in the name of the button (Click text, Label):

.

Then, set up a Button Click rule. Changeditem is the button's item binding (set in properties). We create a variable that will be a new instance of order or appointment and assign the customer id from the account. In the end, we open a new appointment/order record.

You can fill out the new forms further. In the new order, we set the account's address as the shipping address.

In the new appointment, we add the date of creation and name of the appointment by concatenating "Meeting with:" and the account's primary contact.

Example: start the questionnaire

Clicking the Inspections button opens up a new questionnaire.

If the button is clicked, we fetch questionnaire template which is published and its name equals "Equipment checkup". If this fetch contains data, the questionnaire is opened.

Used Fetch:

Example: start inspection

Warning Work in progress! We are in the process of updating the information on this page. Subject to change.