Namespace: component

CSL. component

Contains all the methods for custom scripting on a context manager

Source:

Methods


.getAll(options)

Gets all the components on the page.

Parameters:
Name Type Description
options object

Specify the options for this function.

Properties
Name Type Argument Default Description
getOriginalState boolean <optional>
false

Return the original states of the component instead of the current state.

pickersOnly boolean <optional>
false

Return only the picker sources.

Source:
Returns:

An array of objects containing the id, object name and view name of a component.

Type
Array.<object>
Examples
CSL.component.getAll();
CSL.component.getAll({ getOriginalState: true });

.getByName(options)

Gets a single component on the page by its object and view name.

Parameters:
Name Type Description
options object

Specify the options for this function.

Properties
Name Type Argument Default Description
object string

Specify the object name.

view string

Specify the view name.

getOriginalState boolean <optional>
false

Return the original states of the component instead of the current state.

pickersOnly boolean <optional>
false

Return only the picker sources.

Source:
Returns:

An array of objects containing the id, object name and view name of the component if found.

Type
Array.<object>
Example
CSL.component.getByName({ object: "PurchaseOrderHeader", view: "Get All Purchase Order Headers"});

.reload(options)

Reloads the component

Parameters:
Name Type Description
options object

Specify the options for this function.

Properties
Name Type Argument Description
componentId string <optional>

Specify the id of the component(s) to reload. Can be an array.

componentConfig object <optional>

Specify the configuration for a component. Can be an array.

Properties
Name Type Argument Description
object string <optional>

Specify the object that contains the view.

view string <optional>

Specify the name of the view.

Source: