Class Comments

A plugin that contains "comments" methods

Hierarchy

  • Comments

Properties

activityTypes: default<string, number>

Storage of all potential activity types which comments can be attached to: Unknown, Request, WorkOrder, CaTask, CaObject, CaCorrection, Project, Contract

currentActivityType: string

Storage of object's active activityType

Methods

  • Add a comment - for adding a comment to an object when the object is already known. Always call comment.add from request, case, workorder, or inspection.

    Returns

    Returns a Promise which represents a CommentRecord object

    Parameters

    • sid: number

      The SID of the activity to which the comment should be attached

    • comment: string

      The text for the comment

    Returns Promise<unknown>

  • Get comments for activity items

    Returns

    Returns Promise object that represents a collection of available comments

    Parameters

    • sids: number[]

      The options SIDs to get comments for.

    Returns Promise<unknown>

  • Get pre-defined comments for activityTypes

    Returns

    Returns Promise object that represents a collection of available comment templates.

    Parameters

    • Optional problemSid: number

      The ProblemSid if currentActivityType is (Service) Request

    • Optional category: string

      Only applies to WorkOrder and ServiceRequest category comments.

    Returns Promise<unknown>

  • Update a comment

    Returns

    Returns a Promise which represents a CommentRecord object

    Parameters

    • id: number

      The ID of the comment which should be updated

    • comment: string

      The new text for the updated comment

    Returns Promise<unknown>