How to do it...

  1. Extract ch6-design-pattern-discovery.zip to a folder on your machine and copy/paste the following files into your alExtensibleAppProject folder. Make sure to replace the following files with the ones you extracted:
    • Post Transaction.al
    • Transaction Entry.al
    • Transaction Worksheet.al
    • Post Transaction Action.al
    • Handle Post Transaction Action.al

Now, open the alExtensibleAppProject folder in Visual Studio Code.

  1. The first thing we need to do is add an event that can be subscribed to in order to add new post actions.

In Explorer, select Post Transaction Action.al and add the following event publisher to the table:

[IntegrationEvent(false, false)]procedure OnAddPostTransactionAction(var TempPostTransactionAction: Record "Post ...

Get Microsoft Dynamics 365 Business Central Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.