Class CustomType

A record of a custom entity created by the environment's implementer.

Hierarchy (View Summary)

Properties

classOid: string = ""
context: Context
fields: IDictionary
fieldsWithAlias: IDictionary
isNew: boolean = false
lists: IDictionary

Accessors

  • get Oid(): string
  • The the record identifier.

    Returns string

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 an object.

    Parameters

    • context: Context

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

    • OptionalclassRef: string

      Identifier of the type metadata.

    • OptionalinstanceRef: string

      Instance identifier.

    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>

  • Change the value of a field of the record.

    Parameters

    • fieldName: string

      Field name.

    • value: any

      The new value for the 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 custom record 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.

    • classOid: string

      Identifier of type metadata.

    • recordId: string

      Identifier of the instance.

    • useCache: boolean = false

      Do not store the record in the local cache.

    Returns Promise<any>

    Promise to get the object instance.

  • Parse Json content and populate the record.

    Parameters

    • context: Context

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

    • classOid: string

      Identifier of the type metadata.

    • json: any

      Json content.

    Returns CustomType

  • Retrieve a list of objects.

    Parameters

    • context: Context

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

    • classOid: string

      Identifier of type metadata.

    • useCache: boolean = true

      Do not store the record in the local cache.

    Returns Promise<CustomType[]>

    Promise to get the object list.

  • Create a new instance of a custom record and initialize fields based on type metadata.

    Parameters

    • context: Context

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

    • classOid: string

      Identifier of the type metadata.

    Returns Promise<CustomType>

    Promise to get the object instance of a department

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

    Parameters

    • context: Context

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

    • classOid: string

      Identifier of the type metadata.

    • data: IDictionary

      A dictionary holding the record's data.

    Returns CustomType

    Object loaded.