Skip to main content

Constructors

NSTicket()

Initializes a new instance of the NSTicket class.

Methods

GetActivate()

Returns: CRMScript.Global.DateTime - When the ticket should be activated, if it is postponed. Example:

GetAlertLevel()

Returns: CRMScript.Global.Integer - The alert level for the ticket. Matches the level value of the ticket_alert table. Example:

GetAlertTimeout()

Returns: CRMScript.Global.DateTime - The datetime for when the ticket should jump to the next alert_level. Example:

GetAuthor()

Returns: CRMScript.Global.String - A string representing the author of the ticket (same as author of first message). Example:

GetBaseStatus()

Returns: CRMScript.Global.Integer - The status of the ticket. See <xref href=“CRMScript.NetServer.TicketBaseStatus” data-throw-if-not-resolved=“false”></xref>. Example:

GetCategory()

Returns: CRMScript.Global.Integer - The ID of the category a ticket is in. Example:

GetCategoryFullname()

Returns: CRMScript.Global.String - The fullname (compiled from parents’ names) for this category. E.g. ‘norway/product A/support’. Example:

GetCategoryName()

Returns: CRMScript.Global.String - The (short) name of this category. E.g. ‘support’. Example:

GetClosedAt()

Returns: CRMScript.Global.DateTime - When the ticket was closed. Example:

GetConnectId()

Returns: CRMScript.Global.Integer - If a ticket is connected to another ticket, this field is set to the ID of the ‘master’ ticket. Example:

GetCreatedAt()

Returns: CRMScript.Global.DateTime - When the ticket was created. Example:

GetCreatedBy()

Returns: CRMScript.Global.Integer - The ID of the user who created the ticket. 1 (system user) if the ticket was created externally. Example:

GetCreatedByName()

Returns: CRMScript.Global.String - Initials, also login name, possibly database user name. Example:

GetCustId()

Returns: CRMScript.Global.Integer - The reference to the customer. NULL or -1 if ticket is not connected to customer. Example:

GetDeadline()

Returns: CRMScript.Global.DateTime - Deadline for ticket. Example:

GetFirstReadByUser()

Returns: CRMScript.Global.DateTime - The datetime for when the ticket first was read by a user. Example:

GetFromAddress()

Returns: CRMScript.Global.String - The from-address used when this ticket got created, e.g. by email. Example:

GetHasAttachment()

Returns: CRMScript.Global.Bool - Bool indicating if this ticket has one or more attachments. Example:

GetLastChanged()

Returns: CRMScript.Global.DateTime - The last time the ticket was modified. Example:

GetNumMessages()

Returns: CRMScript.Global.Integer - The total number of messages for this request. Example:

GetNumReplies()

Returns: CRMScript.Global.Integer - The number of replies (messages) to the customer for this request. Example:

GetOrigin()

Returns: CRMScript.Global.Integer - What is the origin of this ticket? See <xref href=“CRMScript.NetServer.TicketOrigin” data-throw-if-not-resolved=“false”></xref>. Example:

GetOwnedBy()

Returns: CRMScript.Global.Integer - The ID of the user who owns the ticket. 1 (system user) if the ticket is unassigned. Example:

GetOwnedByName()

Returns: CRMScript.Global.String - Initials, also login name, possibly database user name. Example:

GetPersonFirstname()

Returns: CRMScript.Global.String - First name. Example:

GetPersonFullname()

Returns: CRMScript.Global.String - Gets the full name for the primary person (customer). Example:

GetPersonLastname()

Returns: CRMScript.Global.String - Last name. Example:

GetPersonMiddleName()

Returns: CRMScript.Global.String - Middle name or ‘van’ etc. Example:

GetPriority()

Returns: CRMScript.Global.Integer - The reference to the ticket_priority table. Example:

GetPriorityName()

Returns: CRMScript.Global.String - The name of the priority. Example:

GetReadByCustomer()

Returns: CRMScript.Global.DateTime - The datetime for when the ticket was read by the customer. Example:

GetReadByOwner()

Returns: CRMScript.Global.DateTime - The datetime for when the ticket last was read by the owner. Example:

GetReadStatus()

Returns: CRMScript.Global.Integer - Whether the owner has read the ticket or not (red, yellow, green). See <xref href=“CRMScript.NetServer.TicketReadStatus” data-throw-if-not-resolved=“false”></xref>. Example:

GetRealTimeSpentExternally()

Returns: CRMScript.Global.Integer - The total time (seconds) within 24x7 the ticket has been in a external waiting status (configurable), not including current state. Example:

GetRealTimeSpentInternally()

Returns: CRMScript.Global.Integer - The total time (seconds) within 24x7 the ticket has been in an open status (configurable), not including current state. Example:

GetRealTimeSpentQueue()

Returns: CRMScript.Global.Integer - The total time (seconds) within 24x7 hours the ticket has been in a queue status, not including current state. Example:

GetRealTimeToClose()

Returns: CRMScript.Global.Integer - Same as time_to_close, but not calculated based on priority. Example:

GetRealTimeToReply()

Returns: CRMScript.Global.Integer - Same as time_to_reply, but not calculated based on priority. Example:

GetRepliedAt()

Returns: CRMScript.Global.DateTime - The datetime for when the ticket was replied to. I.e. the first external message added to the ticket. Example:

GetSlevel()

Returns: CRMScript.Global.Integer - The security-level of the ticket. See <xref href=“CRMScript.NetServer.TicketSecurityLevel” data-throw-if-not-resolved=“false”></xref>. Example:

GetTicketId()

Returns: CRMScript.Global.Integer - The primary key (auto-incremented). Example:

GetTicketStatus()

Returns: CRMScript.Global.Integer - User-defined ticket status. Example:

GetTicketStatusDisplayValue()

Gets the display name of the ticket status.
Returns: CRMScript.Global.String Example:

GetTimeSpentExternally()

Returns: CRMScript.Global.Integer - The total time (seconds) within the priority’s office hours the ticket has been in a external waiting status (configurable), not including current state. Example:

GetTimeSpentInternally()

Returns: CRMScript.Global.Integer - The total time (seconds) within the priority’s office hours the ticket has been in an open status (configurable), not including current state. Example:

GetTimeSpentQueue()

Returns: CRMScript.Global.Integer - The total time (seconds) within the priority’s office hours the ticket has been in a queue status, not including current state. Example:

GetTimeToClose()

Returns: CRMScript.Global.Integer - The time (minutes) between when the ticket was created and when it was closed. Calculated based on priority’s time frame. Example:

GetTimeToReply()

Returns: CRMScript.Global.Integer - The time (minutes) between when the ticket was created and when it was replied to. Calculated based on priority’s time frame. Example:

GetTitle()

Returns: CRMScript.Global.String - The title of the ticket. Example:

SetActivate(DateTime)

Returns: CRMScript.Global.Void Example:

SetAlertLevel(Integer)

Returns: CRMScript.Global.Void Example:

SetAlertTimeout(DateTime)

Returns: CRMScript.Global.Void Example:

SetAuthor(String)

Returns: CRMScript.Global.Void Example:

SetBaseStatus(Integer)

Returns: CRMScript.Global.Void Example:

SetCategory(Integer)

Returns: CRMScript.Global.Void Example:

SetCategoryFullname(String)

Returns: CRMScript.Global.Void Example:

SetCategoryName(String)

Returns: CRMScript.Global.Void Example:

SetClosedAt(DateTime)

Returns: CRMScript.Global.Void Example:

SetConnectId(Integer)

Returns: CRMScript.Global.Void Example:

SetCreatedAt(DateTime)

Returns: CRMScript.Global.Void Example:

SetCreatedBy(Integer)

Returns: CRMScript.Global.Void Example:

SetCreatedByName(String)

Returns: CRMScript.Global.Void Example:

SetCustId(Integer)

Returns: CRMScript.Global.Void Example:

SetDeadline(DateTime)

Returns: CRMScript.Global.Void Example:

SetFirstReadByUser(DateTime)

Returns: CRMScript.Global.Void Example:

SetFromAddress(String)

Returns: CRMScript.Global.Void Example:

SetHasAttachment(Bool)

Returns: CRMScript.Global.Void Example:

SetLastChanged(DateTime)

Returns: CRMScript.Global.Void Example:

SetNumMessages(Integer)

Returns: CRMScript.Global.Void Example:

SetNumReplies(Integer)

Returns: CRMScript.Global.Void Example:

SetOrigin(Integer)

Returns: CRMScript.Global.Void Example:

SetOwnedBy(Integer)

Returns: CRMScript.Global.Void Example:

SetOwnedByName(String)

Returns: CRMScript.Global.Void Example:

SetPersonFirstname(String)

Returns: CRMScript.Global.Void Example:

SetPersonFullname(String)

Sets the full name for the primary person (customer)
Returns: CRMScript.Global.Void Example:

SetPersonLastname(String)

Returns: CRMScript.Global.Void Example:

SetPersonMiddleName(String)

Returns: CRMScript.Global.Void Example:

SetPriority(Integer)

Returns: CRMScript.Global.Void Example:

SetPriorityName(String)

Returns: CRMScript.Global.Void Example:

SetReadByCustomer(DateTime)

Returns: CRMScript.Global.Void Example:

SetReadByOwner(DateTime)

Returns: CRMScript.Global.Void Example:

SetReadStatus(Integer)

Returns: CRMScript.Global.Void Example:

SetRealTimeSpentExternally(Integer)

Returns: CRMScript.Global.Void Example:

SetRealTimeSpentInternally(Integer)

Returns: CRMScript.Global.Void Example:

SetRealTimeSpentQueue(Integer)

Returns: CRMScript.Global.Void Example:

SetRealTimeToClose(Integer)

Returns: CRMScript.Global.Void Example:

SetRealTimeToReply(Integer)

Returns: CRMScript.Global.Void Example:

SetRepliedAt(DateTime)

Returns: CRMScript.Global.Void Example:

SetSlevel(Integer)

Returns: CRMScript.Global.Void Example:

SetTicketId(Integer)

Returns: CRMScript.Global.Void Example:

SetTicketStatus(Integer)

Returns: CRMScript.Global.Void Example:

SetTicketStatusDisplayValue(String)

Gets the display name of the ticket status.
Returns: CRMScript.Global.Void Example:

SetTimeSpentExternally(Integer)

Returns: CRMScript.Global.Void Example:

SetTimeSpentInternally(Integer)

Returns: CRMScript.Global.Void Example:

SetTimeSpentQueue(Integer)

Returns: CRMScript.Global.Void Example:

SetTimeToClose(Integer)

Returns: CRMScript.Global.Void Example:

SetTimeToReply(Integer)

Returns: CRMScript.Global.Void Example:

SetTitle(String)

Returns: CRMScript.Global.Void Example: