> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSTicketPriorityEntity

> Entity for a ticket priority. This entity describes the meta data for a ticket priority, and provides special operations on it.

Entity for a ticket priority. This entity describes the meta data for a ticket priority, and provides special operations on it.

## Constructors

### NSTicketPriorityEntity()

```crmscript theme={null}
NSTicketPriorityEntity
```

Initializes a new instance of the NSTicketPriorityEntity class.

## Methods

## GetChangedOwner()

```crmscript theme={null}
Integer GetChangedOwner()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - What to do with the escalation chain when the request changes owner (manually). See \<xref href="CRMScript.NetServer.TicketPriorityEscalateEvent" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer changedOwner = thing.GetChangedOwner();
```

## GetDeadline()

```crmscript theme={null}
Integer GetDeadline()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Deadline to add if escalated (minutes).

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer deadline = thing.GetDeadline();
```

## GetFlags()

```crmscript theme={null}
Integer GetFlags()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - A bit mask of flags. See \<xref href="CRMScript.NetServer.TicketPriorityFlags" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer flags = thing.GetFlags();
```

## GetFriStart()

```crmscript theme={null}
DateTime GetFriStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Fridays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime friStart = thing.GetFriStart();
```

## GetFriStop()

```crmscript theme={null}
DateTime GetFriStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Fridays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime friStop = thing.GetFriStop();
```

## GetMonStart()

```crmscript theme={null}
DateTime GetMonStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Mondays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime monStart = thing.GetMonStart();
```

## GetMonStop()

```crmscript theme={null}
DateTime GetMonStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Mondays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime monStop = thing.GetMonStop();
```

## GetName()

```crmscript theme={null}
String GetName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the priority.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
String name = thing.GetName();
```

## GetNonDates()

```crmscript theme={null}
DateTime[] GetNonDates()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime)\[] - Dates which the escalation time should not be running.

<Note>
  Note that only the day of the year (day and month) is used. So the year and time part is not used even if this is a DateTime
</Note>

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime[] nonDates = thing.GetNonDates();
```

## GetSatStart()

```crmscript theme={null}
DateTime GetSatStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Saturdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime satStart = thing.GetSatStart();
```

## GetSatStop()

```crmscript theme={null}
DateTime GetSatStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Saturdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime satStop = thing.GetSatStop();
```

## GetSortOrder()

```crmscript theme={null}
Integer GetSortOrder()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Indicates the sort order for this priority. 1 is first, 100 is last.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer sortOrder = thing.GetSortOrder();
```

## GetStatus()

```crmscript theme={null}
Integer GetStatus()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The status (normal/deleted) of the priority. See \<xref href="CRMScript.NetServer.TicketPriorityStatus" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer status = thing.GetStatus();
```

## GetSunStart()

```crmscript theme={null}
DateTime GetSunStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Sundays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime sunStart = thing.GetSunStart();
```

## GetSunStop()

```crmscript theme={null}
DateTime GetSunStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Sundays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime sunStop = thing.GetSunStop();
```

## GetThuStart()

```crmscript theme={null}
DateTime GetThuStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Thursdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime thuStart = thing.GetThuStart();
```

## GetThuStop()

```crmscript theme={null}
DateTime GetThuStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Thursdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime thuStop = thing.GetThuStop();
```

## GetTicketChangedPriority()

```crmscript theme={null}
Integer GetTicketChangedPriority()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - What to do with the escalation chain when the request is changed into this priority. See \<xref href="CRMScript.NetServer.TicketPriorityEscalateEvent" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketChangedPriority = thing.GetTicketChangedPriority();
```

## GetTicketClosed()

```crmscript theme={null}
Integer GetTicketClosed()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - indicates what to do with the escalation chain when the request is closed. See \<xref href="CRMScript.NetServer.TicketPriorityEscalateEvent" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketClosed = thing.GetTicketClosed();
```

## GetTicketNew()

```crmscript theme={null}
Integer GetTicketNew()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - What to do with the escalation chain when a new request is registered. See \<xref href="CRMScript.NetServer.TicketPriorityEscalateEvent" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketNew = thing.GetTicketNew();
```

## GetTicketNewinfo()

```crmscript theme={null}
Integer GetTicketNewinfo()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - What to do with the escalation chain when the request gets new info. See \<xref href="CRMScript.NetServer.TicketPriorityEscalateEvent" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketNewinfo = thing.GetTicketNewinfo();
```

## GetTicketPriorityId()

```crmscript theme={null}
Integer GetTicketPriorityId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The primary key (auto-incremented).

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketPriorityId = thing.GetTicketPriorityId();
```

## GetTicketRead()

```crmscript theme={null}
Integer GetTicketRead()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - What to do with the escalation chain when the request is read. See \<xref href="CRMScript.NetServer.TicketPriorityEscalateEvent" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketRead = thing.GetTicketRead();
```

## GetTueStart()

```crmscript theme={null}
DateTime GetTueStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Tuesdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime tueStart = thing.GetTueStart();
```

## GetTueStop()

```crmscript theme={null}
DateTime GetTueStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Tuesdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime tueStop = thing.GetTueStop();
```

## GetWedStart()

```crmscript theme={null}
DateTime GetWedStart()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour start for Wednesdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime wedStart = thing.GetWedStart();
```

## GetWedStop()

```crmscript theme={null}
DateTime GetWedStop()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The work hour stop for Wednesdays. Note that only the time part of the DateTime is used.

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime wedStop = thing.GetWedStop();
```

## SetChangedOwner(Integer)

```crmscript theme={null}
Void SetChangedOwner(Integer changedOwner)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer changedOwner;
thing.SetChangedOwner(changedOwner);
```

## SetDeadline(Integer)

```crmscript theme={null}
Void SetDeadline(Integer deadline)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer deadline;
thing.SetDeadline(deadline);
```

## SetFlags(Integer)

```crmscript theme={null}
Void SetFlags(Integer flags)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer flags;
thing.SetFlags(flags);
```

## SetFriStart(DateTime)

```crmscript theme={null}
Void SetFriStart(DateTime friStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime friStart;
thing.SetFriStart(friStart);
```

## SetFriStop(DateTime)

```crmscript theme={null}
Void SetFriStop(DateTime friStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime friStop;
thing.SetFriStop(friStop);
```

## SetMonStart(DateTime)

```crmscript theme={null}
Void SetMonStart(DateTime monStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime monStart;
thing.SetMonStart(monStart);
```

## SetMonStop(DateTime)

```crmscript theme={null}
Void SetMonStop(DateTime monStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime monStop;
thing.SetMonStop(monStop);
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
String name;
thing.SetName(name);
```

## SetNonDates(DateTime\[])

```crmscript theme={null}
Void SetNonDates(DateTime[] nonDates)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime[] nonDates;
thing.SetNonDates(nonDates);
```

## SetSatStart(DateTime)

```crmscript theme={null}
Void SetSatStart(DateTime satStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime satStart;
thing.SetSatStart(satStart);
```

## SetSatStop(DateTime)

```crmscript theme={null}
Void SetSatStop(DateTime satStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime satStop;
thing.SetSatStop(satStop);
```

## SetSortOrder(Integer)

```crmscript theme={null}
Void SetSortOrder(Integer sortOrder)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer sortOrder;
thing.SetSortOrder(sortOrder);
```

## SetStatus(Integer)

```crmscript theme={null}
Void SetStatus(Integer status)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer status;
thing.SetStatus(status);
```

## SetSunStart(DateTime)

```crmscript theme={null}
Void SetSunStart(DateTime sunStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime sunStart;
thing.SetSunStart(sunStart);
```

## SetSunStop(DateTime)

```crmscript theme={null}
Void SetSunStop(DateTime sunStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime sunStop;
thing.SetSunStop(sunStop);
```

## SetThuStart(DateTime)

```crmscript theme={null}
Void SetThuStart(DateTime thuStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime thuStart;
thing.SetThuStart(thuStart);
```

## SetThuStop(DateTime)

```crmscript theme={null}
Void SetThuStop(DateTime thuStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime thuStop;
thing.SetThuStop(thuStop);
```

## SetTicketChangedPriority(Integer)

```crmscript theme={null}
Void SetTicketChangedPriority(Integer ticketChangedPriority)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketChangedPriority;
thing.SetTicketChangedPriority(ticketChangedPriority);
```

## SetTicketClosed(Integer)

```crmscript theme={null}
Void SetTicketClosed(Integer ticketClosed)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketClosed;
thing.SetTicketClosed(ticketClosed);
```

## SetTicketNew(Integer)

```crmscript theme={null}
Void SetTicketNew(Integer ticketNew)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketNew;
thing.SetTicketNew(ticketNew);
```

## SetTicketNewinfo(Integer)

```crmscript theme={null}
Void SetTicketNewinfo(Integer ticketNewinfo)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketNewinfo;
thing.SetTicketNewinfo(ticketNewinfo);
```

## SetTicketPriorityId(Integer)

```crmscript theme={null}
Void SetTicketPriorityId(Integer ticketPriorityId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketPriorityId;
thing.SetTicketPriorityId(ticketPriorityId);
```

## SetTicketRead(Integer)

```crmscript theme={null}
Void SetTicketRead(Integer ticketRead)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
Integer ticketRead;
thing.SetTicketRead(ticketRead);
```

## SetTueStart(DateTime)

```crmscript theme={null}
Void SetTueStart(DateTime tueStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime tueStart;
thing.SetTueStart(tueStart);
```

## SetTueStop(DateTime)

```crmscript theme={null}
Void SetTueStop(DateTime tueStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime tueStop;
thing.SetTueStop(tueStop);
```

## SetWedStart(DateTime)

```crmscript theme={null}
Void SetWedStart(DateTime wedStart)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime wedStart;
thing.SetWedStart(wedStart);
```

## SetWedStop(DateTime)

```crmscript theme={null}
Void SetWedStop(DateTime wedStop)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSTicketPriorityEntity thing;
DateTime wedStop;
thing.SetWedStop(wedStop);
```


## Related topics

- [NSTicketEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSTicketEntity.md)
- [NSListAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSListAgent.md)
- [Put Ticket Priority Entity](/en/api/reference/restful/rest/list_ticketpriority/put-ticket-priority-entity.md)
- [Get Ticket Priority Entity](/en/api/reference/restful/rest/list_ticketpriority/get-ticket-priority-entity.md)
- [Post Ticket Priority Entity](/en/api/reference/restful/rest/list_ticketpriority/post-ticket-priority-entity.md)
- [Delete Ticket Priority Entity](/en/api/reference/restful/rest/list_ticketpriority/delete-ticket-priority-entity.md)
