The requirement is to add menu item button on Job card form that will be enabled if the production order has any quality orders, disabled otherwise. It should open the quality order related to production order.
These are the steps:
- Create form extension and add new menu item button
Make sure that you set the button property AutoDeclaration to Yes. This menu item will open the Quality orders form. The data source on the new menu item button should be set to ProdTable.
- Create new class called the same as the form followed by EventHandler
- This form has a method called setButtonAccess. It will be extended by creating new Pre-EventHandler method. Right click on the setButtonAcess, select Copy event handler method and Pre-event handler.
Go to the class and paste select event handler method.
- The requirement is that the button should be enabled if there is a quality order for the production order on the main form. This will be achieved by the following: