admAddFieldToScreen

Description

Adds a field(custom field or system field) to a screen.

Parameters

Return Type

String

Returns 'true' if the field is successfully added to the screen and 'false' otherwise.

Examples

Example 1

Adding a system field to a screen, in the first tab, default(last position) in tab:

admAddFieldToScreen("TestScreen", "priority");

Example 2

Adding a system field to a screen, in the tab "TestTab", first position in tab:

admAddFieldToScreen("TestScreen", "priority", "TestTab", 0);

Example 3

Adding a custom field to a screen, in the tab "TestTab", default(last) position in tab:

admAddFieldToScreen("TestScreen", "customfield_10000", "TestTab");

 

The method throws an exception if the screen name or field parameters are empty or don't refer to a valid screen/field. Also an exception is thrown if the field is already presented in the screen.

If the tab name is provided and a tab with this name does't exist in the screen, it will be created and added as the last tab in the screen.

 

See also