Workflow Customization by Means of Automation Steps

Along with visual customization tools that can be used to customize forms, MYOB Advanced provides the automation functionality, which you can use to change the functionality of forms.

With functional customization, you can change the existing business logic associated with particular screens to fit your business processes and requirements. By using screen automation functionality, you can add document statuses, provide different default values for specific elements, or make some of the elements unavailable, depending on document statuses. For example, you can configure the system so that bills with small amounts will be automatically approved and paid on the Bills and Adjustments (AP301000) form, while bills with large amounts will require approval that can be performed only by using the Approve Bills for Payment (AP502000) form.

Note: The functionality is available if the Workflow Automation feature is enabled on the Enable/Disable Features (CS100000) form.

Also, you can create automation schedules and set up document processing to be performed automatically according to schedules, with only the documents matching specific conditions being processed. For details, see Automated Processing: General Information.

Important: If a workflow that uses the workflow engine is configured for a form, automation steps are disabled and cannot be used, even if the workflow has been published as code customization. If you try to use the old automation steps on such a form, the following warning is displayed on the Automation Steps (SM205000) form for the Screen ID box: This screen uses the new workflow engine. All automation steps will be ignored. For details on workflows, see Workflow API Guide and Workflow UI Guide.

Understanding Automation Steps

As a rule, you can create documents or objects of different types with the help of data entry forms (screens). For example, by using the Bills and Adjustments (AP301000) form, you can create bills, credit adjustments, debit adjustments, and prepayments. Documents of different types are processed differently in the system, and most of the functionality is built in. For some of the data entry forms, specific business logic for documents of different types is implemented through the sets of automation steps created for these forms and can be further modified with the help of automation steps.

An automation step is a set of conditions for a document that, when reached, causes particular actions defined for the step to be performed, or restrictions on the values to be applied.

Only data entry forms can be customized with the help of automation steps. For example, for the Bills and Adjustments form, six automation steps define which of the actions on the form toolbar are available and which of the elements are unavailable for documents of each type with different statuses.

You use the Automation Steps (SM205000) form to create functional automation for the appropriate data entry form.

Once you selected the data entry form for automation, before you start to configure automation steps, think through all types of documents that can be created on the form and how different their workflows should be. Specify the conditions on which the particular actions should be performed, and set up the default values for the elements or the restrictions for the values of the elements (input mask or minimum and maximum values).

Defining Conditions for the Automation Step

Automation steps are executed conditionally. On the Conditions tab of the Automation Steps form, specify the conditions for applying the automation step. You can specify one condition or multiple conditions joined by logical operators (OR or AND). If a form can be used to create documents of multiple types, conditions can be used to select documents of a particular type and with a particular status.

If you select a lookup element for a condition, you can select any value from the list to be used in the condition. For example, if you set up a condition for the documents with the Balanced status, select Status as the Field Name, Equal as the Condition, and Balanced as the Value.

If you select an input element in a condition, manually enter the value.

Redefining Actions for the Step

Once conditions are specified, on the Actions tab, select the actions to be performed for the documents matching the specified conditions. You can reload all the actions available for the form and redefine some of them for the step.

For each action available on the target form, you can select one of the following options:

  • Disable it on the form once conditions are met
  • Run it automatically
  • Hide the action from the toolbar
  • Use the action in its default meaning
  • Convert it to a menu with menu options (reports or inquiries) added by using the Fill with Values dialog box
  • Run the action in batch mode for all matching documents

To convert an action on the toolbar to a menu, you need to add options to this menu by using the Fill With Values dialog box. You can add, for example, a report to the Reports menu or an inquiry to the Inquiries menu. To add a report, an inquiry, or another action, perform the following actions:

  1. In the Field Name box, type @reportID, or @inquiryID, or @ActionName.
  2. In the Value box, type the ID of the report (for example, SO641010), inquiry (for example, ViewActivities), or action (for example, AddTask).
  3. To save the changes and close the dialog box, click Close.

You can also update the Notification action to attach multiple reports to one mailing. The attached reports may have different formats (for example, you can attach a PDF and an HTML report to the same email). To attach multiple reports to one mailing, do the following:

  1. On the Actions tab, open the Fill with Values dialog box for the Notification action.
  2. In the @notification line, in the Value column, specify the mailing IDs, separated by commas.

The mailing will be sent according to the recipients of the first mailing in the line. The recipients of the other mailings will be discarded.

Also, for the automation step, you can specify what should happen on failure of the redefined action or on its success. To do this, click Flow on the Details toolbar and specify what actions from this automation step or other automation steps should be performed on failure or success of the step.

Redefining Fields for the Step

On the Fields tab, you can specify how some of the fields should be redefined when the conditions are met. You can select a field and do one of the following:

  • Set a minimum value, a maximum value, or both
  • Redefine a field as a combo box
  • Assign a default value
  • Set up an input mask to ensure that the correct data will be entered or the correct format will be used
  • Disable the field
  • Hide the field

By using the Combo Box Values action, which opens the dialog box of the same name, you can add new values to the existing list of combo box values or create a new list for an input field redefined as a combo box. Only user-defined values can be removed from a the combo box list.