Event.Form.MainGrid.GridCodeName

Event.Form.MainGrid.GridCodeName returns the code name for the grid. This value can be used to determine the grid that is present in the form layout, especially in management reporting form layouts and the MainMain form layout. To find this value, open a grid layout and look for the Grid Code Name field (second field down in top left corner).

Applies To

Properties and Methods

None

Available

The .GridCodeName property is available in:

  • 16.05.065
  • 16.06.030
  • 16.07.004
  • 17.00.001
  • All newer builds

Note: The .GridCodeName property and all sub-classes, properties, and methods are only available in Form Layout scripts.

Type

String

Syntax

Event.Form.MainGrid.GridCodeName;

Parameters

None

Example

//--Add this script to the ContAdd Record Load event

 

Event.Base();

var lpMainGrid = Event.Form.MainGrid;

Event.Form.MessageBox('Grid Code Name: ' + lpMainGrid.GridCodeName);

 

/* Expected prompt response:

Grid Code Name: contadd

*/