Class ComponentCustomScripting

This class represents the API for custom scripting related to components. You can access all the methods by using the namespace CSL.component.

Hierarchy

  • ComponentCustomScripting

Methods

  • Get all the components on the page. A component is an ADM or CM.

    const components = CSL.component.getAll();
    

    Returns

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

    Returns ComponentInstance[]

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

    CSL.component.getByName('Product', 'Get All Products');
    

    Returns

    An array of objects containing the id, object name and view name of the component(s) when found.

    Parameters

    • objectName: string

      The name of the object

    • viewName: string

      The name of the view.

    Returns ComponentInstance[]

  • Reloads the component with the given object and view name.

    CSL.component.reload('Product', 'Get All Products');
    

    Parameters

    • objectName: string

      The name of the object.

    • viewName: string

      The name of the view.

    Returns void

Generated using TypeDoc