K2BTools Tutorial - Exercise 16.5 - Adding a new action

Note: For this part you will have to download the following XPZ. It will contain "PaymentReceivedNotification" procedure that will complete the invoice payment and will use the payment notification event.

This procedure loads a SDT that contains relevant data related to the Event, information that will be substituted in the event type’s message templates and then calls 'NewEvent' procedure in order to trigger the event.

Now that the event was created, it is time to add an action to the invoices work with in order to complete the payments.

  1. Open Genexus and go to Invoice "Entity Services".
  2. Right click on "Work With" node and "Add>Actions".
  3. Richt click on "Actions" node and add the following action:
    • Action Name (Id): NewPayment
    • GXObject: PaymentReceivedNotification
    • Image: K2BMsgSuccess
    • Position: InGrid
  4. Add an arguments node to "NewPayment" action, with the following argument:
    InvoiceCode Argument

  5. Build your application (F5) and go inside "WWInvoice" and make a new payment. All the users subscribed to this entity should be notified.