Wednesday, March 17, 2010

How to close the main form immediately after closing the sub form

Here is the standard NAV example to close the main form immediately after closing the sub form.

1) Open the Form 5784 from the Object Designer.

2) Click the Modify button to open the “Source Document Filter Card” from the ‘Filters to Get Source Docs.’ form.

3) Close the “Source Document Filter Card”. This will close the main form “Filters to Get Source Docs.” as well.

You can close the form conditionally, using the following set of example code in the ‘Run’ button.

GetSourceBatch.USEREQUESTFORM(ShowRequestForm);
GetSourceBatch.RUNMODAL;
IF GetSourceBatch.NotCancelled THEN
  CurrForm.CLOSE;

No comments:

Post a Comment