Overriding Base Application Events via Design

Home/Overriding Base Application Events via Design

Overriding Base Application Events via Design

You are here:
There are three important steps in overriding a base event. Here is an example of how you would remove the print dialog after creating a License Plate in the WHI Ship app.

Note

This is example will only cover Warehouse Shipments via application code WHSE_SHIPMENT_DOC, there is also Transfers via TRANSFERS_OUT_DOC and depending on your location configuration Sales Documents via SALES_OUT_DOC)

Create a custom event

  • In Business Central, search ‘WHI Application’, select Warehouse Insight Application list
  • Find the application you are interested in modifying, in our case it’s WHSE_SHIPMENT_DOC, open the application.
  • On the Menu ribbon select Design.
  • Find the function/method you want to overwrite. In our case it is ‘When a License Plate is Stopped’.
Warehouse Insight Application Designer
  • You will want to mirror this function in your own application so take a screenshot.
  • Navigate back to the Warehouse Insight Application list and create a new application.
  • Give your application a meaningful Code and Description. In my case it will be called ‘MY_CUSTOM_CODE’.
  • On the Menu ribbon, again open the Design. You will notice the designer is empty.
  • Create a Custom Event by dragging its associated puzzle piece from the left side bar under ‘Events’ onto the white board.
  • Name the event using a meaningful name, remember this name for later. In my example it is ‘Custom Override’.
  • Complete the event as you see fit, in this case we are just duplicating the base event we saved in the screenshot earlier and leaving out the printing portion. 
* Refer to the attached Warehouse Insight Application Development PDF if you need help with this.
Download the Warehouse Insight Application Development Guide
Warehouse Insight Application Design
  • Once you’re done, click Save

Create a Warehouse Insight Application Override

  • In Business Central, search ‘Application Overrides’. Select the Warehouse Insight Application Overrides list.
  • Create a new override as seen in the image below.
    • Enter a Code and Description that is meaningful. In my case I have entered ‘MY_APP_OVERRIDE’.
    • In the Application Code choose the application you created in step 7. In my case it was ‘MY_CUSTOM_CODE’.
    • In the Events list, start a new line.
      • Choose the Event you wish to override, in our case it is ‘Stop License Plate’.
      • In Trigger, choose if you want to run before or after the base event. In our case we want our code to run ‘Before’ the base event.
      • Enter your event name in the Override Event Name. In our case it is ‘Custom Override’.
      • Choose if you still want to Execute Base Event. In our case this will be ‘No’.
  • Close the Warehouse Insight Application Override.

Link the App Override with the Base App

  • In Business Central, return to the Warehouse Insight Application list.
  • Open the application you are modifying. In our case it’s ‘WHSE_SHIPMENT_DOC’.
  • Choose the Override Code that you used in step 14.a. In my case it is ‘My_APP_OVERRIDE’.
Warehouse Insight Application
  • You are done! Open your WHI in the scanner and go Options->Reload Config and try your new changes.
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?

Leave A Comment

Go to Top