Constructed class Returned by RemoteObjects.openEditObject

Hierarchy

  • RpcObject
    • EditObject

Constructors

  • Opens an edit context for the record identified by entity and key.

    Parameters

    • remoteAPI: JsonRpcApi
    • entity: string

      The entity name, e.g. "Comp"

    • key: string

      The key of the record. Use key = 0 to create a new record

    Returns EditObject

Properties

attachmentList: AttachmentList
categories: Map<string, JSONPrimitiveRecord> = ...
closecontext: boolean = true
commit: boolean = false
dataSetList: DataSetList
entity: string

The entity name, e.g. "Comp"

id: string
isDirty: boolean = false
key: string

The key of the record. Use key = 0 to create a new record

masterData: Record<string, string | number> = {}
otherFuncs: object[] = []
requestObject: null | RpcNamedOperation
responseObject: {}

Type declaration

    Accessors

    Methods

    • Activates a category. If the user does not have the appropriate rights on the category, an exception is thrown.

      Parameters

      • categoryName: string

      Returns void

    • Clears all relations for the specified detail

      Parameters

      • detail: string

        The detail name, e.g. "Comp"

      Returns void

    • Copies data from an existing record in the database. The same entity as the current is assumed. The table views within the index range minIndex to maxIndex are copied. By default, all table views are copied. To copy a single detail, obtain the table view index using IndexFromDetail and use this value as MinIndex and MaxIndex.

      Parameters

      • key: string

        The key of the source record.

      • minTableView: number = 0

        The index of first table view to be copied.

      • maxTableView: number = 999

        The index of last table view to be copied.

      Returns void

    • Deletes a detail relation

      Parameters

      • detail: string

        The detail name, e.g. "Comp"

      • detailKey: string

        The key of the detail

      Returns void

    • Retrieves the DataSet for category categoryName. Can be null when the category is not available to the current user.

      Parameters

      • categoryName: string

        name of the category, e.g. "DOCU$INVOICING"

      Returns DataSet

    • Retrieves a relation DataSet for the specified detail in the edit context.

      Parameters

      • detail: string

        The detail name, e.g. "Comp"

      • filter: string = ""

        SQL filter expression, e.g. "COMMENT like '%template%'"

      • includeBlobContent: boolean = false

        If true, blob fields (e.g. memo, stream) are returned

      Returns DataSet

    • Inserts an file

      Parameters

      • attachedFileType: number

        1 = embedded, 2 = linked, 4 = remote, 5 = large

      • path: string

        The path of the file that will be saved in the filePath field.

      Returns void

    • Inserts a detail relation

      Parameters

      • detail: string
      • detailKey: string
      • linkMainCompany: boolean = false
      • retrieveName: boolean = false

      Returns void

    • Requests that a unique reference number be generated when committing.

      Parameters

      • id: string

      Returns void

    • Sets the security for a user or group.

      Parameters

      • userKey: string

        The user or group for which security is added.

      • securityValue: number

        A sum of one or more of the following values: 1 (search), 2 (read), 4 (write), 8 (delete) and 256 (secure). Useful combinations are 7 (read/write), 15 (read/write/delete) and 271 (full control = read/write/delete/secure).

      Returns void

      See

    • Sets the user relations.

      Parameters

      • users: string[]

        The array of user IDs (keys).

      • clear: boolean = false

        If true, clears the current user selection.

      Returns void

    • Updates an embedded file

      Parameters

      • key: string | number

        Leave null or 0 to set the stream of the just inserted Attachment

      • base64String: string

      Returns void

    • Assign a single field:value to a category dataset

      Parameters

      • categoryName: string
      • name: string
      • value: string | number

      Returns void

    • Updates field values of a detail relation. When the detail relation doesn't exist, an exception is thrown.

      Parameters

      • detail: string

        The detail name, e.g. "Comp"

      • detailKey: string

        The key of the detail. If detailKey is 0, the current detail record is used

      • fieldsObj: JSONPrimitiveRecord

        e.g. {"OPENED": "0"}

      Returns void

    • Updates the field values of a master data set

      Parameters

      • name: string
      • value: string | number

      Returns void