Class Department

A Department is a functional area or business unit within an organization.

Hierarchy (View Summary)

Constructors

Properties

classOid: string = ""
context: Context
fields: IDictionary
fieldsWithAlias: IDictionary
isNew: boolean = false
lists: IDictionary
ClassName: string = "Venki.Organization.Department"
ClassOid: string = "9da7d39b-0747-4825-8302-3f5248685c0c"

Accessors

  • get ManagerOid(): number
  • Get the identifier of the department manager

    Returns number

  • set ManagerOid(value: number): void
  • Set the identifier of the department manager

    Parameters

    • value: number

    Returns void

  • get ParentDepartmentOid(): number
  • Get the identifier of the parent department

    Returns number

  • set ParentDepartmentOid(value: number): void
  • Set the identifier of the parent department

    Parameters

    • value: number

    Returns void

Methods

  • Add a row to the record list.

    Parameters

    • fieldName: string

      Name of the record list.

    • record: any

      A dictionary containing all the fields of the row.

    Returns Promise<CustomType>

    A promise to retrieve the content of the new object added to the record list.

  • Delete a row in a record list.

    Parameters

    • fieldName: string

      Name of the record list.

    • instanceId: string

      Identifier of the row of the record list.

    Returns Promise<void>

  • Delete a list of rows in a record list.

    Parameters

    • fieldName: string

      Name of the record list.

    • instances: string[]

    Returns Promise<void>

  • Retrieve all rows from a record list field.

    Parameters

    • fieldName: string

      Name of the record list.

    Returns Promise<CustomType[]>

    A promise to retrieve the content record list.

  • Parameters

    • className: string
    • fieldName: string
    • key: string | number
    • value: any

    Returns void

  • Populate the object's fields with data from the record.

    Parameters

    • data: IDictionary

      A dictionary holding the record's data.

    Returns void

  • Save all pending changes of the department.

    Parameters

    • context: Context

      Context information of the call. In most of the cases you can build the context using the request object.

    Returns Promise<string | number>

    Identifier of the saved record.

  • Save all pending changes of a field of type record list.

    Parameters

    • context: Context

      Context information of the call. In most of the cases you can build the context using the request object.

    • fieldName: string

      Name of the record list.

    Returns Promise<void>

  • Set the value of a custom field.

    Parameters

    • fieldName: string

      Name or alias of the field. (click the script icon in the edition dialog)

    • value: any

      Current value of the custom field.

    Returns void

  • Update a row in a record list.

    Parameters

    • fieldName: string

      Name of the record list.

    • instanceId: string

      A list of identifiers for the rows in the record list.

    • record: any

      A dictionary containing all the fields of the row.

    Returns Promise<void>

  • Find a department by an identifier

    Parameters

    • context: Context

      Context information of the call. In most of the cases you can build the context using the request object.

    • id: number

      Identifier of the instance.

    Returns Promise<Department>

    Promise to get the object instance of a department.

  • Create a new instance of a department and initialize all fields.

    Parameters

    • context: Context

      Context information of the call. In most of the cases you can build the context using the request object.

    Returns Promise<Department>

    Promise to get the object instance of a department

  • Load the object's content from JSON data.

    Parameters

    • context: Context

      Context information of the call. In most of the cases you can build the context using the request object.

    • data: any[]

      An array of key-value pairs (JSON data).

    Returns Department

    Object instance initialized.

  • Search for objects using filter criteria. To create the filter, use a condition that follows the OData filter syntax and includes the available fields fields in the environment.

    Parameters

    • context: Context

      Context information of the call. In most of the cases you can build the context using the request object.

    • filter: string

      A filter expression following the OData filter syntax.

    • useCache: boolean = true

      It stores the content in a local cache for later reuse. The cache lifespan is approximately 600 seconds.

    Returns Promise<Department[]>

    Promise to get the a list of objects retrieved from the backend based on the search criteria. Note: the retrieval is limited to a maximum of 1,000 records.