Skip to content

Activate

By default, the first visible child tab will be activated on load of Detail View. Sometimes it is useful to open a different tab. Using the new activate() function you can do so.

Code

1
2
3
// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.DV;
dv.getChildrenTabs().activate("subtablename");

Please note that subtablename is the name of the table and not the label/caption of the tab itself.

Result

Calling dv.getChildrenTabs().activate("notes"); in hooks/TABLENAME-dv.js activates the child-tab containing notes (DE: Notizen).

Tip

You can also use the activate() function depending on conditions, not only on load. For example if the records has a certain status, it is important to fill out fields on a certain tab.

  • TODO: JSE
    activate children tab if more than one lookup exists for the same table

See also