getColumnIndexFromFieldName( fieldName )
This method retrieves a column index number based on a field name.
Parameters
fieldNameĀ - field name, as defined in the subfile record format
Example
Retrieve column index and then remove column
var columnIndex = getObj("Grid1").grid.getColumnIndexFromFieldName("CUSTNUM");
getObj("Grid1").grid.removeColumn(columnIndex);