Expansions

Expansions extend, or expand the functionality of a primary window. Microsoft Dynamics GP uses expansion windows when the current window isn’t large enough to display all relevant fields. Use an expansion window only if you cannot add its functionality to the parent window.

An expansion window includes two objects; an expansion field and an expansion window. For instance, the expansion button for the Credit Card expansion field in the Payables Transaction Entry window displays a window allowing the associated card name, receipt number, date and payment number to be specified for the Credit Card amount.

[spacer]

[spacer]

Creating an expansion window

To create an expansion window in your application, complete the following steps.

  1. Create a new window.

Add a new window to an existing form, then display the window’s layout. When you design the window’s layout, add fields from the form’s auto-linked table that are relevant, but not necessary to save the record properly. An expansion window should never include required fields.

When you save the record from the main window, the copy to table statement will automatically copy the contents from both the main and expansion windows to the current table buffer. When retrieving a record, the copy from table statement will retrieve the current record and fill both the main window and the expansion window.

  1. Add an OK button.

An expansion window typically has an OK button. The OK button should simply close the window.

close window RM_Sales_Entry_Credit_Card;

Even though the expansion window will close, information in the expansion window will persist until you clear the form. This information allows the save operation to save the contents of both the main and expansion windows.

  1. Add an expansion button.

In the main window, add the global field named ‘Expansion Button 1’ to the right of the expansion field.

[spacer]

Global field

Control

Expansion Button 1


  1. Attach an expansion button script.

Attach a change script to the expansion button similar to the following example. The change script should open another window for the current form.

open window RM_Sales_Entry_Credit_Card;


Documentation Feedback