Class Account

An account is an abstraction to other types such as Person and Group

Hierarchy (View Summary)

Constructors

  • Create a new instance of the type Account. In case of a new record use the method NewAsync instead of this constructor.

    Parameters

    • context: Context

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

    Returns Account

Properties

classOid: string = ""
context: Context
email: string = ""
fields: IDictionary
fieldsWithAlias: IDictionary
isNew: boolean = false
lists: IDictionary
name: string = ""
oid: number = 0
ClassName: string = "Venki.Services.Account"
ClassOid: string = "78f6400a-40c3-4d46-b2fb-45e087ffc21e"

Accessors

  • get Email(): string
  • Get the email of the account (person or group)

    Returns string

  • set Email(value: string): void
  • Set the email of the account (person or group)

    Parameters

    • value: string

    Returns void

  • get Name(): string
  • Get the name of the account (person or group)

    Returns string

  • set Name(value: string): void
  • Set the identifier of the account (person or group)

    Parameters

    • value: string

    Returns void

  • get Oid(): number
  • Get the identifier of the account (person or group)

    Returns number

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.

    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 account (person or group) 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<Person>

    Promise to get the object instance of a person or group.

  • Create a new instance of an Account 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<Account>

    Promise to get the new object instance of a person or group.

  • 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 Account

    Object instance initialized.