> ## 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.

# NSPriceList

> A price list is basically a collection of products. It can be valid in a time period, and outright deactivated. All prices in the product list is in a specific currency. We have decieded not to separate prices and products, which means that we get a simpler data model, but some redundancy.

A price list is basically a collection of products. It can be valid in a time period, and outright deactivated. All prices in the product list is in a specific currency. We have decieded not to separate prices and products, which means that we get a simpler data model, but some redundancy.

## Constructors

### NSPriceList()

```crmscript theme={null}
NSPriceList
```

Initializes a new instance of the NSPriceList class.

## Methods

## GetCurrency()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The iso currency code, like 'USD' or 'NOK'.

**Example:**

```crmscript theme={null}
NSPriceList thing;
String currency = thing.GetCurrency();
```

## GetCurrencyName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name to use in the user interface, like perhaps 'US dollar' or '\$'.

**Example:**

```crmscript theme={null}
NSPriceList thing;
String currencyName = thing.GetCurrencyName();
```

## GetDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Description of this price list, will be used as tool-tip in the user interface.

**Example:**

```crmscript theme={null}
NSPriceList thing;
String description = thing.GetDescription();
```

## GetERPPriceListKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The key that uniquely identifies this price list in the ERP system.

**Example:**

```crmscript theme={null}
NSPriceList thing;
String eRPPriceListKey = thing.GetERPPriceListKey();
```

## GetIsActive()

```crmscript theme={null}
Bool GetIsActive()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Is the list active (as opposed to being worked on, suddenly canceled, etc.

**Example:**

```crmscript theme={null}
NSPriceList thing;
Bool isActive = thing.GetIsActive();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of this price list to use in the user interface.

**Example:**

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

## GetPriceListId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key.

**Example:**

```crmscript theme={null}
NSPriceList thing;
Integer priceListId = thing.GetPriceListId();
```

## GetQuoteConnectionId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The connection to the ERP system used for this price list.

<Note>
  Reserved for future use
</Note>

**Example:**

```crmscript theme={null}
NSPriceList thing;
Integer quoteConnectionId = thing.GetQuoteConnectionId();
```

## GetValidFrom()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The date (inclusive) the price list start to be valid. This can be DateTime.MinValue to signal that it doesn't have a specific start date.

**Example:**

```crmscript theme={null}
NSPriceList thing;
DateTime validFrom = thing.GetValidFrom();
```

## GetValidTo()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The date (inclusive) the price list ends to be valid. This can be DateTime.MaxValue to signal that it doesn't have a specific end date.

**Example:**

```crmscript theme={null}
NSPriceList thing;
DateTime validTo = thing.GetValidTo();
```

## SetCurrency(String)

```crmscript theme={null}
Void SetCurrency(String currency)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
String currency;
thing.SetCurrency(currency);
```

## SetCurrencyName(String)

```crmscript theme={null}
Void SetCurrencyName(String currencyName)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
String currencyName;
thing.SetCurrencyName(currencyName);
```

## SetDescription(String)

```crmscript theme={null}
Void SetDescription(String description)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
String description;
thing.SetDescription(description);
```

## SetERPPriceListKey(String)

```crmscript theme={null}
Void SetERPPriceListKey(String eRPPriceListKey)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
String eRPPriceListKey;
thing.SetERPPriceListKey(eRPPriceListKey);
```

## SetIsActive(Bool)

```crmscript theme={null}
Void SetIsActive(Bool isActive)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
Bool isActive;
thing.SetIsActive(isActive);
```

## SetName(String)

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

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

**Example:**

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

## SetPriceListId(Integer)

```crmscript theme={null}
Void SetPriceListId(Integer priceListId)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
Integer priceListId;
thing.SetPriceListId(priceListId);
```

## SetQuoteConnectionId(Integer)

```crmscript theme={null}
Void SetQuoteConnectionId(Integer quoteConnectionId)
```

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

<Note>
  Reserved for future use
</Note>

**Example:**

```crmscript theme={null}
NSPriceList thing;
Integer quoteConnectionId;
thing.SetQuoteConnectionId(quoteConnectionId);
```

## SetValidFrom(DateTime)

```crmscript theme={null}
Void SetValidFrom(DateTime validFrom)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
DateTime validFrom;
thing.SetValidFrom(validFrom);
```

## SetValidTo(DateTime)

```crmscript theme={null}
Void SetValidTo(DateTime validTo)
```

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

**Example:**

```crmscript theme={null}
NSPriceList thing;
DateTime validTo;
thing.SetValidTo(validTo);
```


## Related topics

- [Price lists](/en/automation/crmscript/howto/quote/price-list.md)
- [NSQuoteAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSQuoteAgent.md)
- [NSQuoteConnection](/en/automation/crmscript/reference/CRMScript.NetServer.NSQuoteConnection.md)
- [PriceList](/en/api/archive-providers/reference/pricelist.md)
- [Delete Price List](/en/api/reference/restful/rest/list_price/delete-price-list.md)
- [Get Price List](/en/api/reference/restful/rest/list_price/get-price-list.md)
