Class NSSale
Syntax
Constructors
NSSale()
Initializes a new instance of the NSSale class.
Introduced or updated in version: 7
Declaration
NSSale
Methods
GetActiveErpLinks()
Introduced or updated in version: 7.5
Declaration
Integer GetActiveErpLinks()
Returns
Type | Description |
---|---|
Integer | The number of active ERP links. |
Examples
NSSale thing;
Integer activeErpLinks = thing.GetActiveErpLinks();
GetAmount()
Introduced or updated in version: 7
Declaration
Float GetAmount()
Returns
Type | Description |
---|---|
Float | Total sale amount. |
Examples
NSSale thing;
Float amount = thing.GetAmount();
GetAssociateFullName()
Introduced or updated in version: 7
Declaration
String GetAssociateFullName()
Returns
Type | Description |
---|---|
String | The sale's owner. |
Examples
NSSale thing;
String associateFullName = thing.GetAssociateFullName();
GetAssociateId()
Introduced or updated in version: 7
Declaration
Integer GetAssociateId()
Returns
Type | Description |
---|---|
Integer | The sale's owner Id. |
Examples
NSSale thing;
Integer associateId = thing.GetAssociateId();
GetCompleted()
Introduced or updated in version: 7.5
Declaration
Integer GetCompleted()
Returns
Type | Description |
---|---|
Integer | The Sale completed state. |
Remarks
The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field.
Examples
NSSale thing;
Integer completed = thing.GetCompleted();
GetContactId()
Introduced or updated in version: 7
Declaration
Integer GetContactId()
Returns
Type | Description |
---|---|
Integer | Optional contact reference. |
Examples
NSSale thing;
Integer contactId = thing.GetContactId();
GetContactName()
Introduced or updated in version: 7
Declaration
String GetContactName()
Returns
Type | Description |
---|---|
String | Contact name. |
Examples
NSSale thing;
String contactName = thing.GetContactName();
GetCurrency()
Introduced or updated in version: 7
Declaration
String GetCurrency()
Returns
Type | Description |
---|---|
String | NSCurrency the sale was made in. |
Examples
NSSale thing;
String currency = thing.GetCurrency();
GetDescription()
Introduced or updated in version: 7
Declaration
String GetDescription()
Returns
Type | Description |
---|---|
String | The sales description. |
Examples
NSSale thing;
String description = thing.GetDescription();
GetEarning()
Introduced or updated in version: 7
Declaration
Float GetEarning()
Returns
Type | Description |
---|---|
Float | Earning on sale. |
Examples
NSSale thing;
Float earning = thing.GetEarning();
GetEarningPercent()
Introduced or updated in version: 7
Declaration
Float GetEarningPercent()
Returns
Type | Description |
---|---|
Float | Earning as percent of total. |
Examples
NSSale thing;
Float earningPercent = thing.GetEarningPercent();
GetNextDueDate()
Introduced or updated in version: 8.0sr3
Declaration
DateTime GetNextDueDate()
Returns
Type | Description |
---|---|
DateTime | Next due date, this is a de-normalization of 'closest future activity date, or most recent if no future activities'. |
Remarks
Maintained by the system, but very convenient for searching.
Examples
NSSale thing;
DateTime nextDueDate = thing.GetNextDueDate();
GetNumber()
Introduced or updated in version: 7
Declaration
String GetNumber()
Returns
Type | Description |
---|---|
String | Alphanumeric user field. |
Examples
NSSale thing;
String number = thing.GetNumber();
GetPersonFullName()
Introduced or updated in version: 7
Declaration
String GetPersonFullName()
Returns
Type | Description |
---|---|
String | The name of the person this sale belongs to. |
Examples
NSSale thing;
String personFullName = thing.GetPersonFullName();
GetPersonId()
Introduced or updated in version: 7
Declaration
Integer GetPersonId()
Returns
Type | Description |
---|---|
Integer | The sale's contact persons Id. |
Examples
NSSale thing;
Integer personId = thing.GetPersonId();
GetProbability()
Introduced or updated in version: 7
Declaration
Integer GetProbability()
Returns
Type | Description |
---|---|
Integer | Actual probability, may differ from the one in the list. |
Examples
NSSale thing;
Integer probability = thing.GetProbability();
GetProjectId()
Introduced or updated in version: 7
Declaration
Integer GetProjectId()
Returns
Type | Description |
---|---|
Integer | Optional project reference. |
Examples
NSSale thing;
Integer projectId = thing.GetProjectId();
GetProjectName()
Introduced or updated in version: 7
Declaration
String GetProjectName()
Returns
Type | Description |
---|---|
String | Project name. |
Examples
NSSale thing;
String projectName = thing.GetProjectName();
GetSaleDate()
Introduced or updated in version: 7
Declaration
DateTime GetSaleDate()
Returns
Type | Description |
---|---|
DateTime | (expected / lost / won) sales date. |
Examples
NSSale thing;
DateTime saleDate = thing.GetSaleDate();
GetSaleId()
Introduced or updated in version: 7
Declaration
Integer GetSaleId()
Returns
Type | Description |
---|---|
Integer | Primary key. |
Examples
NSSale thing;
Integer saleId = thing.GetSaleId();
GetSaleTypeId()
Introduced or updated in version: 7.5
Declaration
Integer GetSaleTypeId()
Returns
Type | Description |
---|---|
Integer | The sale's type Id. |
Examples
NSSale thing;
Integer saleTypeId = thing.GetSaleTypeId();
GetSaleTypeName()
Introduced or updated in version: 7.5
Declaration
String GetSaleTypeName()
Returns
Type | Description |
---|---|
String | The sale's type name. |
Examples
NSSale thing;
String saleTypeName = thing.GetSaleTypeName();
GetStatus()
Introduced or updated in version: 7
Declaration
Integer GetStatus()
Returns
Type | Description |
---|---|
Integer | The sale's status, indicating wether the sale is open, sold or lost. See SaleStatus. |
Examples
NSSale thing;
Integer status = thing.GetStatus();
GetTitle()
Introduced or updated in version: 7
Declaration
String GetTitle()
Returns
Type | Description |
---|---|
String | Sale heading (short description?). |
Examples
NSSale thing;
String title = thing.GetTitle();
GetWeightedAmount()
Introduced or updated in version: 7
Declaration
Float GetWeightedAmount()
Returns
Type | Description |
---|---|
Float | The weighted amount ( amount * probability / 100). |
Examples
NSSale thing;
Float weightedAmount = thing.GetWeightedAmount();
SetActiveErpLinks(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetActiveErpLinks(Integer activeErpLinks)
Parameters
Type | Name | Description |
---|---|---|
Integer | activeErpLinks | The number of active ERP links. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer activeErpLinks;
thing.SetActiveErpLinks(activeErpLinks);
SetAmount(Float)
Introduced or updated in version: 7
Declaration
Void SetAmount(Float amount)
Parameters
Type | Name | Description |
---|---|---|
Float | amount | Total sale amount. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Float amount;
thing.SetAmount(amount);
SetAssociateFullName(String)
Introduced or updated in version: 7
Declaration
Void SetAssociateFullName(String associateFullName)
Parameters
Type | Name | Description |
---|---|---|
String | associateFullName | The sale's owner. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String associateFullName;
thing.SetAssociateFullName(associateFullName);
SetAssociateId(Integer)
Introduced or updated in version: 7
Declaration
Void SetAssociateId(Integer associateId)
Parameters
Type | Name | Description |
---|---|---|
Integer | associateId | The sale's owner Id. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer associateId;
thing.SetAssociateId(associateId);
SetCompleted(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetCompleted(Integer completed)
Parameters
Type | Name | Description |
---|---|---|
Integer | completed | The Sale completed state. |
Returns
Type | Description |
---|---|
Void |
Remarks
The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field.
Examples
NSSale thing;
Integer completed;
thing.SetCompleted(completed);
SetContactId(Integer)
Introduced or updated in version: 7
Declaration
Void SetContactId(Integer contactId)
Parameters
Type | Name | Description |
---|---|---|
Integer | contactId | Optional contact reference. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer contactId;
thing.SetContactId(contactId);
SetContactName(String)
Introduced or updated in version: 7
Declaration
Void SetContactName(String contactName)
Parameters
Type | Name | Description |
---|---|---|
String | contactName | Contact name. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String contactName;
thing.SetContactName(contactName);
SetCurrency(String)
Introduced or updated in version: 7
Declaration
Void SetCurrency(String currency)
Parameters
Type | Name | Description |
---|---|---|
String | currency | NSCurrency the sale was made in. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String currency;
thing.SetCurrency(currency);
SetDescription(String)
Introduced or updated in version: 7
Declaration
Void SetDescription(String description)
Parameters
Type | Name | Description |
---|---|---|
String | description | The sales description. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String description;
thing.SetDescription(description);
SetEarning(Float)
Introduced or updated in version: 7
Declaration
Void SetEarning(Float earning)
Parameters
Type | Name | Description |
---|---|---|
Float | earning | Earning on Sale. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Float earning;
thing.SetEarning(earning);
SetEarningPercent(Float)
Introduced or updated in version: 7
Declaration
Void SetEarningPercent(Float earningPercent)
Parameters
Type | Name | Description |
---|---|---|
Float | earningPercent | Earning as percent of total. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Float earningPercent;
thing.SetEarningPercent(earningPercent);
SetNextDueDate(DateTime)
Maintained by the system, but very convenient for searching.
Introduced or updated in version: 8.0sr3
Declaration
Void SetNextDueDate(DateTime nextDueDate)
Parameters
Type | Name | Description |
---|---|---|
DateTime | nextDueDate | Next due date, this is a de-normalization of 'closest future activity date, or most recent if no future activities'. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
DateTime nextDueDate;
thing.SetNextDueDate(nextDueDate);
SetNumber(String)
Alphanumeric user field
Introduced or updated in version: 7
Declaration
Void SetNumber(String number)
Parameters
Type | Name | Description |
---|---|---|
String | number | Alphanumeric user field. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String number;
thing.SetNumber(number);
SetPersonFullName(String)
Introduced or updated in version: 7
Declaration
Void SetPersonFullName(String personFullName)
Parameters
Type | Name | Description |
---|---|---|
String | personFullName | The name of the person this sale belongs to. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String personFullName;
thing.SetPersonFullName(personFullName);
SetPersonId(Integer)
Introduced or updated in version: 7
Declaration
Void SetPersonId(Integer personId)
Parameters
Type | Name | Description |
---|---|---|
Integer | personId | The sale's contact persons Id. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer personId;
thing.SetPersonId(personId);
SetProbability(Integer)
Introduced or updated in version: 7
Declaration
Void SetProbability(Integer probability)
Parameters
Type | Name | Description |
---|---|---|
Integer | probability | Actual probability, may differ from the one in the list. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer probability;
thing.SetProbability(probability);
SetProjectId(Integer)
Introduced or updated in version: 7
Declaration
Void SetProjectId(Integer projectId)
Parameters
Type | Name | Description |
---|---|---|
Integer | projectId | Optional project reference. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer projectId;
thing.SetProjectId(projectId);
SetProjectName(String)
Introduced or updated in version: 7
Declaration
Void SetProjectName(String projectName)
Parameters
Type | Name | Description |
---|---|---|
String | projectName | Project name. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String projectName;
thing.SetProjectName(projectName);
SetSaleDate(DateTime)
Introduced or updated in version: 7
Declaration
Void SetSaleDate(DateTime saleDate)
Parameters
Type | Name | Description |
---|---|---|
DateTime | saleDate | (expected / lost / won) sales date. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
DateTime saleDate;
thing.SetSaleDate(saleDate);
SetSaleId(Integer)
Introduced or updated in version: 7
Declaration
Void SetSaleId(Integer saleId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleId | Primary key. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer saleId;
thing.SetSaleId(saleId);
SetSaleTypeId(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetSaleTypeId(Integer saleTypeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleTypeId | The sale's type Id. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer saleTypeId;
thing.SetSaleTypeId(saleTypeId);
SetSaleTypeName(String)
Introduced or updated in version: 7.5
Declaration
Void SetSaleTypeName(String saleTypeName)
Parameters
Type | Name | Description |
---|---|---|
String | saleTypeName | The sale's type name. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String saleTypeName;
thing.SetSaleTypeName(saleTypeName);
SetStatus(Integer)
Introduced or updated in version: 7
Declaration
Void SetStatus(Integer status)
Parameters
Type | Name | Description |
---|---|---|
Integer | status | The sale's status, indicating wether the sale is open, sold or lost. See SaleStatus. |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Integer status;
thing.SetStatus(status);
SetTitle(String)
Introduced or updated in version: 7
Declaration
Void SetTitle(String title)
Parameters
Type | Name | Description |
---|---|---|
String | title | Sale heading (short description?). |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
String title;
thing.SetTitle(title);
SetWeightedAmount(Float)
Introduced or updated in version: 7
Declaration
Void SetWeightedAmount(Float weightedAmount)
Parameters
Type | Name | Description |
---|---|---|
Float | weightedAmount | The weighted amount ( amount * probability / 100). |
Returns
Type | Description |
---|---|
Void |
Examples
NSSale thing;
Float weightedAmount;
thing.SetWeightedAmount(weightedAmount);