Business Events: To Configure the User-Triggered Processing of Subscribers
This activity will walk you through the process of configuring user-triggered processing of subscribers.
Story
Suppose that a sales manager wants to filter pending invoices by using a generic inquiry and initiate the sending of reminders to customers about the invoices. Separate actions should give the sales manager the ability to send reminders for all listed invoices or only those the manager selects.
Acting as the system administrator, you need to configure a business event that the sales manager can use to send invoice reminders to customers from the BE_InvoiceDueTomorrow (BE403010) form, which is a custom generic inquiry that lists invoices.
Process Overview
You will initiate the creation of the business event from the BE_InvoiceDueTomorrow (BE403010) form by opening the form and selecting
on the form title bar.In the Business Events dialog box, which opens, you will click Create Business Event, enter the name of the event in the dialog box, and click OK. The system will open the Business Events (SM302050) form with the generic inquiry form selected as a data source.
On the form, you will configure a subscriber for the event. After the business event has been configured and triggered, you will verify that the notification email appears on the All Records tab of the All Emails (CO409070) form.
System Preparation
Launch the MYOB Acumatica website, and sign in to a tenant with the U100 dataset preloaded as system administrator Kimberly Gibbs. You should sign in by using the gibbs username and the 123 password.
Step 1: Creating a Business Event Triggered by a User
To configure a business event to an action that the sales manager can use to send invoice reminders to customers, do the following:
- Open the BE_InvoiceDueTomorrow (BE403010) inquiry form, and click on the form title bar.
- In the Business Events dialog box, which opens, click
Create Business Event, type Email Invoice
Reminder in the dialog box, and click OK.
The system opens the Business Events (SM302050) form with an active business event for which the BE_InvoiceDueTomorrow (BE403010) form is selected as the data source in the Screen Name box and the event name you entered is specified in the Event ID box.
- In the Type box, select Trigger by Action.
- In the Action Name box, type Email Invoice Reminder.
- In the Raise Event box, select For Each Record.
- In the Description box, type Remind customers about pending invoices.
- On the form toolbar, click Save.
- On the Subscribers tab, click .
- On the Email Templates (SM204003) form, which opens, in the Notification ID box of the Summary area, leave the system-inserted value.
- In the Description box, type Email Invoice Reminder.
- In the From box, select system@sweetlife.com.
- In the To box, type ((CustomerContact_eMail));.
- In the Subject box, type The ((ARInvoice_refNbr)) invoice is pending payment.
- In the Message area, type the following text:
Dear ((CustomerContact_fullName)),
The ((ARInvoice_refNbr)) invoice is due ((ARInvoice_dueDate)). The invoice amount is ((ARInvoice_curyOrigDocAmt)).
- On the form toolbar, click Save & Close.
Step 2: Verifying that the Notification Works Correctly
You have configured a business event that has added actions to the More menu of the BE_InvoiceDueTomorrow (BE403010) generic inquiry form. A user can click one of these actions and send invoice reminders to customers. To test this event, you will select some invoices, click an added action, and see if the notification works correctly. Do the following:
- Open the BE_InvoiceDueTomorrow (BE403010) inquiry form.
- In rows with open invoices, select multiple check boxes in the unlabeled column.
- On the form toolbar, on the More menu, click Email Invoice Reminder.
- Open the All Emails (CO409070) form.
- On the All Records tab, verify that records with text
similar to The 000004 invoice is pending payment in the
Summary column are listed in the table. (The invoice
number will differ depending on which invoices you have selected.)Tip: You may need to refresh the inquiry results multiple times until the records appear. To do this, click Refresh on the form toolbar.
- Click one of these emails to view its details on the Email Activity (CR306015) form. Notice that the system has replaced the placeholders with the data copied from the invoice (see the following screenshot).