Show / Hide Table of Contents

Class NSSaleEntity

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Syntax

Constructors

NSSaleEntity()

Initializes a new instance of the NSSaleEntity class.

Declaration
NSSaleEntity

Methods

GetActiveErpLinks()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Integer GetActiveErpLinks()
Returns
Type Description
Integer

The number of active ERP links.

Examples
NSSaleEntity thing;
Integer activeErpLinks = thing.GetActiveErpLinks();

GetActiveLinks()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Integer GetActiveLinks()
Returns
Type Description
Integer

Number of active links to sale, document, appointment.

Examples
NSSaleEntity thing;
Integer activeLinks = thing.GetActiveLinks();

GetAmount()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Float GetAmount()
Returns
Type Description
Float

Total sale amount.

Examples
NSSaleEntity thing;
Float amount = thing.GetAmount();

GetAppointment()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSAppointment GetAppointment()
Returns
Type Description
NSAppointment
Examples
NSSaleEntity thing;
NSAppointment appointment = thing.GetAppointment();

GetAssociate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSAssociate GetAssociate()
Returns
Type Description
NSAssociate

The sale owner.

Examples
NSSaleEntity thing;
NSAssociate associate = thing.GetAssociate();

GetCompetitor()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSCompetitor GetCompetitor()
Returns
Type Description
NSCompetitor

List of all possible competitors.

Examples
NSSaleEntity thing;
NSCompetitor competitor = thing.GetCompetitor();

GetCompleted()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

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
NSSaleEntity thing;
Integer completed = thing.GetCompleted();

GetContact()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSContact GetContact()
Returns
Type Description
NSContact

The contact associated with the sale. It may also be 0 if no contact is associated with the sale.

Examples
NSSaleEntity thing;
NSContact contact = thing.GetContact();

GetCreatedBy()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSAssociate GetCreatedBy()
Returns
Type Description
NSAssociate

Who created to sale.

Examples
NSSaleEntity thing;
NSAssociate createdBy = thing.GetCreatedBy();

GetCreatedDate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetCreatedDate()
Returns
Type Description
DateTime

Registered date.

Examples
NSSaleEntity thing;
DateTime createdDate = thing.GetCreatedDate();

GetCredited()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSCredited GetCredited()
Returns
Type Description
NSCredited

List of who is to be credited for the sale.

Examples
NSSaleEntity thing;
NSCredited credited = thing.GetCredited();

GetCurrency()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSCurrency GetCurrency()
Returns
Type Description
NSCurrency

The currency the sale object was sold in.

Examples
NSSaleEntity thing;
NSCurrency currency = thing.GetCurrency();

GetCustomFields()

Gets the user-defined + extra fields on a SaleEntity as a map.

Declaration
Map GetCustomFields()
Returns
Type Description
Map
Examples
NSSaleEntity thing;
Map fields = thing.GetCustomFields();
String oldValue = fields.get("SuperOffice:1");
fields.insert("SuperOffice:1", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
  printLine(fields.getKey() + ":  " + fields.getVal());

GetEarning()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Float GetEarning()
Returns
Type Description
Float

Earning on sale.

Examples
NSSaleEntity thing;
Float earning = thing.GetEarning();

GetEarningPercent()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Float GetEarningPercent()
Returns
Type Description
Float

Earning as percent of total.

Examples
NSSaleEntity thing;
Float earningPercent = thing.GetEarningPercent();

GetExtraFields()

Gets the extra fields on SaleEntity as a map.

Declaration
Map GetExtraFields()
Returns
Type Description
Map
Examples
NSSaleEntity thing;
Map fields = thing.GetExtraFields();
String oldValue = fields.get("x_foobar");
fields.insert("x_foobar", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
  printLine(fields.getKey() + ":  " + fields.getVal());

GetHeading()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
String GetHeading()
Returns
Type Description
String

Sale heading (short description?).

Examples
NSSaleEntity thing;
String heading = thing.GetHeading();

GetIsPublished()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Bool GetIsPublished()
Returns
Type Description
Bool

Should this SaleEntity be published and visible to strangers?

GetLinks()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSLink[] GetLinks()
Returns
Type Description
NSLink[]

List of all elements linked to the sale.

Examples
NSSaleEntity thing;
NSLink[] links = thing.GetLinks();

GetNextDueDate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

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
NSSaleEntity thing;
DateTime nextDueDate = thing.GetNextDueDate();

GetNumber()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
String GetNumber()
Returns
Type Description
String

Alphanumeric user field.

Examples
NSSaleEntity thing;
String number = thing.GetNumber();

GetPerson()

A sale may also be connected to a person. This must be a contact person registered on the current contact. This does not mean that a person is required.

Declaration
NSPerson GetPerson()
Returns
Type Description
NSPerson
Examples
NSSaleEntity thing;
NSPerson person = thing.GetPerson();

GetPostit()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
String GetPostit()
Returns
Type Description
String

The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.

Examples
NSSaleEntity thing;
String postit = thing.GetPostit();

GetProbability()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Integer GetProbability()
Returns
Type Description
Integer

Actual probability, may differ from the one in the list.

Examples
NSSaleEntity thing;
Integer probability = thing.GetProbability();

GetProject()

A sale may also be connected to a project, so you see the sale both on the company card, and on the project card. This does not mean that a project is required.

Declaration
NSProject GetProject()
Returns
Type Description
NSProject
Examples
NSSaleEntity thing;
NSProject project = thing.GetProject();

GetPublishEventDate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetPublishEventDate()
Returns
Type Description
DateTime

Publish event date on SaleEntity.

GetPublishFrom()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetPublishFrom()
Returns
Type Description
DateTime

Publish from date on SaleEntity.

GetPublishTo()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetPublishTo()
Returns
Type Description
DateTime

Publish to date on SaleEntity. After this date the event is no longer visible.

GetRating()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSRating GetRating()
Returns
Type Description
NSRating

The sale rating.

Examples
NSSaleEntity thing;
NSRating rating = thing.GetRating();

GetReason()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSReason GetReason()
Returns
Type Description
NSReason

The sale reason.

Examples
NSSaleEntity thing;
NSReason reason = thing.GetReason();

GetReasonSold()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSReasonSold GetReasonSold()
Returns
Type Description
NSReasonSold
Examples
NSSaleEntity thing;
NSReasonSold reasonSold = thing.GetReasonSold();

GetReasonStalled()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSReasonStalled GetReasonStalled()
Returns
Type Description
NSReasonStalled
Examples
NSSaleEntity thing;
NSReasonStalled reasonStalled = thing.GetReasonStalled();

GetReopenDate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetReopenDate()
Returns
Type Description
DateTime

Date the sale is to be reopened; valid only for status=stalled. Not necessarily the same as the nextDueDate.

Examples
NSSaleEntity thing;
DateTime reopenDate = thing.GetReopenDate();

GetSaledate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetSaledate()
Returns
Type Description
DateTime

(expected / lost / won) sales date.

Examples
NSSaleEntity thing;
DateTime saledate = thing.GetSaledate();

GetSaleId()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Integer GetSaleId()
Returns
Type Description
Integer

Primary key.

Examples
NSSaleEntity thing;
Integer saleId = thing.GetSaleId();

GetSaleStakeholders()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSSaleStakeholder[] GetSaleStakeholders()
Returns
Type Description
NSSaleStakeholder[]
Examples
NSSaleEntity thing;
NSSaleStakeholder[] saleStakeholders = thing.GetSaleStakeholders();

GetSaleText()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
String GetSaleText()
Returns
Type Description
String

Text describing the sale.

Examples
NSSaleEntity thing;
String saleText = thing.GetSaleText();

GetSaleType()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSSaleType GetSaleType()
Returns
Type Description
NSSaleType
Examples
NSSaleEntity thing;
NSSaleType saleType = thing.GetSaleType();

GetSource()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSSource GetSource()
Returns
Type Description
NSSource

The sale source.

Examples
NSSaleEntity thing;
NSSource source = thing.GetSource();

GetStatus()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Integer GetStatus()
Returns
Type Description
Integer

The state of the Sale (Open, Sold, Lost, Stalled). See SaleStatus.

Examples
NSSaleEntity thing;
Integer status = thing.GetStatus();

GetUpdatedBy()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
NSAssociate GetUpdatedBy()
Returns
Type Description
NSAssociate

Who updated the sale.

Examples
NSSaleEntity thing;
NSAssociate updatedBy = thing.GetUpdatedBy();

GetUpdatedDate()

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
DateTime GetUpdatedDate()
Returns
Type Description
DateTime

Last updated.

Examples
NSSaleEntity thing;
DateTime updatedDate = thing.GetUpdatedDate();

GetUserDefinedFields()

Gets the user-defined fields on the SaleEntity as a map.

Declaration
Map GetUserDefinedFields()
Returns
Type Description
Map
Examples
NSSaleEntity thing;
Map fields = thing.GetUserDefinedFields();
String oldValue = fields.get("SuperOffice:1");
fields.insert("SuperOffice:1", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
  printLine(fields.getKey() + ":  " + fields.getVal());

GetVisibleFor()

Returns the user groups and/or users the SaleEntity item is visible for.

Declaration
NSVisibleFor[] GetVisibleFor()
Returns
Type Description
NSVisibleFor[]
Examples
NSSaleEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();

SetActiveErpLinks(Integer)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetActiveErpLinks(Integer activeErpLinks)
Parameters
Type Name Description
Integer activeErpLinks

The number of active ERP links.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Integer activeErpLinks;
thing.SetActiveErpLinks(activeErpLinks);

SetActiveLinks(Integer)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetActiveLinks(Integer activeLinks)
Parameters
Type Name Description
Integer activeLinks

Number of active links to sale, document, appointment.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Integer activeLinks;
thing.SetActiveLinks(activeLinks);

SetAmount(Float)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetAmount(Float amount)
Parameters
Type Name Description
Float amount

Total sale amount.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Float amount;
thing.SetAmount(amount);

SetAppointment(NSAppointment)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetAppointment(NSAppointment appointment)
Parameters
Type Name Description
NSAppointment appointment
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSAppointment appointment;
thing.SetAppointment(appointment);

SetAssociate(NSAssociate)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetAssociate(NSAssociate associate)
Parameters
Type Name Description
NSAssociate associate

The sale owner.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSAssociate associate;
thing.SetAssociate(associate);

SetCompetitor(NSCompetitor)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetCompetitor(NSCompetitor competitor)
Parameters
Type Name Description
NSCompetitor competitor

List of all possible competitors.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSCompetitor competitor;
thing.SetCompetitor(competitor);

SetCompleted(Integer)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

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
NSSaleEntity thing;
Integer completed;
thing.SetCompleted(completed);

SetContact(NSContact)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetContact(NSContact contact)
Parameters
Type Name Description
NSContact contact

The contact associated with the sale. It may also be 0 if no contact is associated with the sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSContact contact;
thing.SetContact(contact);

SetCreatedBy(NSAssociate)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetCreatedBy(NSAssociate createdBy)
Parameters
Type Name Description
NSAssociate createdBy

Who created to sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSAssociate createdBy;
thing.SetCreatedBy(createdBy);

SetCreatedDate(DateTime)

Registered date

Declaration
Void SetCreatedDate(DateTime createdDate)
Parameters
Type Name Description
DateTime createdDate

Registered date.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
DateTime createdDate;
thing.SetCreatedDate(createdDate);

SetCredited(NSCredited)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetCredited(NSCredited credited)
Parameters
Type Name Description
NSCredited credited

List of who is to be credited for the sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSCredited credited;
thing.SetCredited(credited);

SetCurrency(NSCurrency)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetCurrency(NSCurrency currency)
Parameters
Type Name Description
NSCurrency currency

The currency the sale object was sold in.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSCurrency currency;
thing.SetCurrency(currency);

SetCustomFields(Map)

Sets the user-defined and extra fields on a SaleEntity with a map.

Declaration
Void SetCustomFields(Map udefs)
Parameters
Type Name Description
Map udefs
Returns
Type Description
Void
Examples
NSSaleEntity thing;
Map udefs;
udefs["SuperOffice:1"] = "[I:123]";
udefs["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
udefs["custom.progid"] = "foobar";
udefs["x_foo"] = "foobar";
udefs["x_bar"] = "456"; // List item id
thing.SetCustomFields(udefs);

SetEarning(Float)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetEarning(Float earning)
Parameters
Type Name Description
Float earning

Earning on sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Float earning;
thing.SetEarning(earning);

SetEarningPercent(Float)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetEarningPercent(Float earningPercent)
Parameters
Type Name Description
Float earningPercent

Earning as percent of total.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Float earningPercent;
thing.SetEarningPercent(earningPercent);

SetExtraFields(Map)

Sets the extra field values on SaleEntity with a map.

Declaration
Void SetExtraFields(Map extras)
Parameters
Type Name Description
Map extras
Returns
Type Description
Void
Examples
NSSaleEntity thing;
Map extras;
extras["SuperOffice:1"] = "[I:123]";
extras["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
extras["custom.progid"] = "foobar";
thing.SetExtraFields(extras);

SetHeading(String)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetHeading(String heading)
Parameters
Type Name Description
String heading

Sale heading (short description?).

Returns
Type Description
Void
Examples
NSSaleEntity thing;
String heading;
thing.SetHeading(heading);

SetIsPublished(Bool)

Sets the visibility of the entity

Declaration
Void SetIsPublished(Bool isPublished)
Parameters
Type Name Description
Bool isPublished

Should this SaleEntity be published and visible to strangers?

Returns
Type Description
Void

SetLinks(NSLink[])

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetLinks(NSLink[] links)
Parameters
Type Name Description
NSLink[] links

List of all elements linked to the sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSLink[] links;
thing.SetLinks(links);

SetNextDueDate(DateTime)

Maintained by the system, but very convenient for searching.

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
NSSaleEntity thing;
DateTime nextDueDate;
thing.SetNextDueDate(nextDueDate);

SetNumber(String)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetNumber(String number)
Parameters
Type Name Description
String number

Alphanumeric user field.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
String number;
thing.SetNumber(number);

SetPerson(NSPerson)

A sale may also be connected to a person. This must be a contact person registered on the current contact. This does not mean that a person is required.

Declaration
Void SetPerson(NSPerson person)
Parameters
Type Name Description
NSPerson person
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSPerson person;
thing.SetPerson(person);

SetPostit(String)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetPostit(String postit)
Parameters
Type Name Description
String postit

The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
String postit;
thing.SetPostit(postit);

SetProbability(Integer)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

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
NSSaleEntity thing;
Integer probability;
thing.SetProbability(probability);

SetProject(NSProject)

A sale may also be connected to a project, so you see the sale both on the company card, and on the project card. This does not mean that a project is required.

Declaration
Void SetProject(NSProject project)
Parameters
Type Name Description
NSProject project
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSProject project;
thing.SetProject(project);

SetPublishEventDate(DateTime)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetPublishEventDate(DateTime publishDate)
Parameters
Type Name Description
DateTime publishDate

Publish event date on SaleEntity.

Returns
Type Description
Void

SetPublishFrom(DateTime)

Sets the publish from date on a SaleEntity.

Declaration
Void SetPublishFrom(DateTime publishFrom)
Parameters
Type Name Description
DateTime publishFrom
Returns
Type Description
Void

SetPublishTo(DateTime)

Sets the publish to date on SaleEntity.

Declaration
Void SetPublishTo(DateTime publishTo)
Parameters
Type Name Description
DateTime publishTo

After this date the event is no longer visible.

Returns
Type Description
Void

SetRating(NSRating)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetRating(NSRating rating)
Parameters
Type Name Description
NSRating rating

The sale rating.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSRating rating;
thing.SetRating(rating);

SetReason(NSReason)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetReason(NSReason reason)
Parameters
Type Name Description
NSReason reason

The sale reason.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSReason reason;
thing.SetReason(reason);

SetReasonSold(NSReasonSold)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetReasonSold(NSReasonSold reasonSold)
Parameters
Type Name Description
NSReasonSold reasonSold
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSReasonSold reasonSold;
thing.SetReasonSold(reasonSold);

SetReasonStalled(NSReasonStalled)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetReasonStalled(NSReasonStalled reasonStalled)
Parameters
Type Name Description
NSReasonStalled reasonStalled
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSReasonStalled reasonStalled;
thing.SetReasonStalled(reasonStalled);

SetReopenDate(DateTime)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetReopenDate(DateTime reopenDate)
Parameters
Type Name Description
DateTime reopenDate

Date the sale is to be reopened; valid only for status=stalled. Not necessarily the same as the nextDueDate.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
DateTime reopenDate;
thing.SetReopenDate(reopenDate);

SetSaledate(DateTime)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetSaledate(DateTime saledate)
Parameters
Type Name Description
DateTime saledate

(expected / lost / won) sales date.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
DateTime saledate;
thing.SetSaledate(saledate);

SetSaleId(Integer)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetSaleId(Integer saleId)
Parameters
Type Name Description
Integer saleId

Primary key.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Integer saleId;
thing.SetSaleId(saleId);

SetSaleStakeholders(NSSaleStakeholder[])

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetSaleStakeholders(NSSaleStakeholder[] saleStakeholders)
Parameters
Type Name Description
NSSaleStakeholder[] saleStakeholders
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSSaleStakeholder[] saleStakeholders;
thing.SetSaleStakeholders(saleStakeholders);

SetSaleText(String)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetSaleText(String saleText)
Parameters
Type Name Description
String saleText

Text describing the sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
String saleText;
thing.SetSaleText(saleText);

SetSaleType(NSSaleType)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetSaleType(NSSaleType saleType)
Parameters
Type Name Description
NSSaleType saleType
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSSaleType saleType;
thing.SetSaleType(saleType);

SetSource(NSSource)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetSource(NSSource source)
Parameters
Type Name Description
NSSource source

The sale source.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSSource source;
thing.SetSource(source);

SetStatus(Integer)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetStatus(Integer status)
Parameters
Type Name Description
Integer status

The state of the Sale (Open,Sold,Lost,Stalled). See SaleStatus.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
Integer status;
thing.SetStatus(status);

SetUpdatedBy(NSAssociate)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetUpdatedBy(NSAssociate updatedBy)
Parameters
Type Name Description
NSAssociate updatedBy

Who updated the sale.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSAssociate updatedBy;
thing.SetUpdatedBy(updatedBy);

SetUpdatedDate(DateTime)

The Sale Entity contains the sale amount, currency, and sale members. Sales are linked to contacts, persons, and/or projects.

Declaration
Void SetUpdatedDate(DateTime updatedDate)
Parameters
Type Name Description
DateTime updatedDate

Last updated.

Returns
Type Description
Void
Examples
NSSaleEntity thing;
DateTime updatedDate;
thing.SetUpdatedDate(updatedDate);

SetUserDefinedFields(Map)

Sets the user-defined fields on the SaleEntity as a map.

Declaration
Void SetUserDefinedFields(Map udefs)
Parameters
Type Name Description
Map udefs
Returns
Type Description
Void
Examples
NSSaleEntity thing;
Map udefs;
udefs["SuperOffice:1"] = "[I:123]";
udefs["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
udefs["custom.progid"] = "foobar";
thing.SetUserDefinedFields(udefs);

SetVisibleFor(NSVisibleFor[])

Sets the user groups and/or users the SaleEntity item is visible for.

Declaration
Void SetVisibleFor(NSVisibleFor[] visibleFor)
Parameters
Type Name Description
NSVisibleFor[] visibleFor
Returns
Type Description
Void
Examples
NSSaleEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
visibleFor[0].SetVisiblity(1);  // usergroup
visibleFor[0].SetVisibleId(123); // usergroup id
thing.SetVisibleFor(visibleFor);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top