This is another case study I gave during a development training class. The whole training went quite fast and trainees wanted another use case to work on. So here is the use case I suggested.
The USE CASE
- We start from an physical BOM (read the previous article to understand how this is done).
- On a physical Part, I want to be able to order a replacement Part, so I want an action “Order replacement”.
- Once selected, it should open a popup with the potential part supplier references defined in the engineering BOM.
- Once selected, if the supplier already has an open order, it adds the reference to the open order. If not it will create a new order and add the reference.
In order to implement this I need 3 different methods.
- A method called by the action which will:
- Open a popup for the user.
- Wait for the user selection.
- Create or update the right purchase order.
- A method called on the popup load which loads the potential part references and fills the select box.
- A method called on the popup’s “ok” button click to return the selected data.
1. Call Popup & Handle Callback
Open popup, wait for popup callback, and then update/create the purchase request.
2. Load the Part Supplier List
Find the potential Part Supplier references and load the select box.
3. “OK” Button Click Event
Return the selected popup data.
Of course you need to create the popup form mentioned in the method.
And once again all this is developed in Aras methods so it is packaged and easy to maintain and upgrade!