Show / Hide Table of Contents

Class SaleEntity

Partial SaleEntity class associating the generated SaleEntity with an interface.

Inheritance
object
SaleEntity
Implements
IRelationEntityCarrier
ILinksContainerEntityCarrier
IProjectRelationEntityCarrier
IContactPersonRelationEntityCarrier
IEntityCarrier
IUdefFieldCarrier
IExtraFieldCarrier
IPublishedCarrier
IVisibleForCarrier
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/11.6.0.0")]
public class SaleEntity : Carrier, IRelationEntityCarrier, ILinksContainerEntityCarrier, IProjectRelationEntityCarrier, IContactPersonRelationEntityCarrier, IEntityCarrier, IUdefFieldCarrier, IExtraFieldCarrier, IPublishedCarrier, IVisibleForCarrier
Examples

Get SaleEntity 123 using the agent:

using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   var agent = new SaleAgent();
   var saleEntity = agent.GetSaleEntity( 123 );
}

Find all SaleEntity, get related items using archive agent.

var archive = new ArchiveAgent();
var rows = archive.GetArchiveListByColumns2("FindSale", "...", null, "getAllRows eq 1", null, 0, 100 );
var history = archive.GetArchiveListByColumns2("SaleHistory", "...", null, "saleId eq 123", null, 0, 100 );
var activities = archive.GetArchiveListByColumns2("SaleActivity", "...", null, "saleId eq 123", null, 0, 100 );
var guide = archive.GetArchiveListByColumns2("SaleGuide", "...", null, "saleId eq 123", null, 0, 100 );
var stakeholders = archive.GetArchiveListByColumns2("SaleStakeholder", "...", null, "saleId eq 123", null, 0, 100 );
var links = archive.GetArchiveListByColumns2("Links", "...", null, "sourceSaleRestrictionId eq 123", null, 0, 100 );

Constructors

SaleEntity()

Default constructor

Declaration
public SaleEntity()
See Also
ISaleAgent

Properties

ActiveErpLinks

The number of active erp links

Declaration
[DataMember]
public virtual int ActiveErpLinks { get; set; }
Property Value
Type Description
int
See Also
ISaleAgent

ActiveLinks

Number of active links to sale, document, appointment.

Declaration
[DataMember]
public virtual int ActiveLinks { get; set; }
Property Value
Type Description
int
See Also
ISaleAgent

Amount

Total sale amount

Declaration
[DataMember]
public virtual double Amount { get; set; }
Property Value
Type Description
double
See Also
ISaleAgent

Appointment

Partial SaleEntity class associating the generated SaleEntity with an interface.

Declaration
[DataMember]
public virtual Appointment Appointment { get; set; }
Property Value
Type Description
Appointment
See Also
ISaleAgent

Associate

The sale owner

Use MDO List name "associate" to get list items.

Declaration
[DataMember]
public virtual Associate Associate { get; set; }
Property Value
Type Description
Associate
See Also
ISaleAgent

Competitor

List of all possible competitors.

Use MDO List name "comptr" to get list items.

Declaration
[DataMember]
public virtual Competitor Competitor { get; set; }
Property Value
Type Description
Competitor
See Also
ISaleAgent

Completed

The Sale completed state. The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field.

Declaration
[DataMember]
public virtual ActivityStatus Completed { get; set; }
Property Value
Type Description
ActivityStatus
See Also
ISaleAgent

Contact

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

Use MDO List name "contact" to get list items.

Declaration
[DataMember]
public virtual Contact Contact { get; set; }
Property Value
Type Description
Contact
See Also
ISaleAgent

CreatedBy

Who created to sale

Declaration
[DataMember]
public virtual Associate CreatedBy { get; set; }
Property Value
Type Description
Associate
See Also
ISaleAgent

CreatedDate

Registered date in UTC.

Declaration
[DataMember]
public virtual DateTime CreatedDate { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

Credited

List of who is to be credited for the sale.

Use MDO List name "credited" to get list items.

Declaration
[DataMember]
public virtual Credited Credited { get; set; }
Property Value
Type Description
Credited
See Also
ISaleAgent

Currency

The currency the sale object was sold in

Use MDO List name "currency" to get list items.

Declaration
[DataMember]
public virtual Currency Currency { get; set; }
Property Value
Type Description
Currency
See Also
ISaleAgent

CustomFields

Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual ExtraFields and UserDefinedFields properties are deprecated in favor of this combined collection.

Declaration
[DataMember]
public StringDictionary CustomFields { get; set; }
Property Value
Type Description
StringDictionary
Remarks

The naming convention of the key string is as follows:

Extra field data [Extra field name]

Example:
'x_gorp' = '[I:123]'
User defined field data [Prog-id name]

Example:
'SuperOffice:1' = '[I:123]'

See Also
ISaleAgent

Earning

Earning on sale

Declaration
[DataMember]
public virtual double Earning { get; set; }
Property Value
Type Description
double
See Also
ISaleAgent

EarningPercent

Earning as percent of total

Declaration
[DataMember]
public virtual double EarningPercent { get; set; }
Property Value
Type Description
double
See Also
ISaleAgent

ExtraFields

Deprecated: Use CustomFields instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc.

Declaration
[DataMember]
public StringDictionary ExtraFields { get; set; }
Property Value
Type Description
StringDictionary
Remarks

The naming convention of the key string is as follows:

Plug-in data [Plug-in name].[Property name] Example: DocumentPlugin.DocumentType
Foreign key data The device identity is appended directly to the device name if it exists. This is not commonly used, but the database opens for this as a possibility to have several devices with the same name, and hence we would ensure an unique key if this field is used. Example: Audience.SecretService.DefaultCountry
User defined table data [Table name].[Field name] Example: Phunneling.AggregatedSales
Other Other data sources must ensure an unique name. If the key already exists we do not add the data to the dictionary. We also ensure that SuperOffice data are added first, so that existing data doesnt change when more data sources are added (with duplicate data keys).
See Also
ISaleAgent

Heading

Sale heading (short description?)

Declaration
[DataMember]
public virtual string Heading { get; set; }
Property Value
Type Description
string
See Also
ISaleAgent

IsPublished

Publication is published

Declaration
[DataMember]
public bool IsPublished { get; set; }
Property Value
Type Description
bool
See Also
ISaleAgent

Links

List of all elements linked to the sale.

Declaration
[DataMember]
public virtual Link[] Links { get; set; }
Property Value
Type Description
Link[]
See Also
ISaleAgent

NextDueDate

Next due date, this is a denormalization of 'closest future activity date, or most recent if no future activities'. Maintained by the system, but very convenient for searching.

Declaration
[DataMember]
public virtual DateTime NextDueDate { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

Number

Alphanumeric user field

Declaration
[DataMember]
public virtual string Number { get; set; }
Property Value
Type Description
string
See Also
ISaleAgent

Person

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.

Use MDO List name "person" to get list items.

Declaration
[DataMember]
public virtual Person Person { get; set; }
Property Value
Type Description
Person
See Also
ISaleAgent

Postit

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

Declaration
[DataMember]
public virtual string Postit { get; set; }
Property Value
Type Description
string
See Also
ISaleAgent

Probability

Actual probability, may differ from the one in the list

Declaration
[DataMember]
public virtual short Probability { get; set; }
Property Value
Type Description
short
See Also
ISaleAgent

Project

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.

Use MDO List name "project" to get list items.

Declaration
[DataMember]
public virtual Project Project { get; set; }
Property Value
Type Description
Project
See Also
ISaleAgent

PublishEventDate

Publish event date

Declaration
[DataMember]
public DateTime PublishEventDate { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

PublishFrom

Publication valid from (inclusive)

Declaration
[DataMember]
public DateTime PublishFrom { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

PublishTo

Publication valid to (inclusive)

Declaration
[DataMember]
public DateTime PublishTo { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

Rating

The sale rating

Use MDO List name "prob" to get list items.

Declaration
[DataMember]
public virtual Rating Rating { get; set; }
Property Value
Type Description
Rating
See Also
ISaleAgent

Reason

The sale reason

Use MDO List name "reason" to get list items.

Declaration
[DataMember]
public virtual Reason Reason { get; set; }
Property Value
Type Description
Reason
See Also
ISaleAgent

ReasonSold

Use MDO List name "reasonsold" to get list items.

Declaration
[DataMember]
public virtual ReasonSold ReasonSold { get; set; }
Property Value
Type Description
ReasonSold
See Also
ISaleAgent

ReasonStalled

Use MDO List name "reasonstalled" to get list items.

Declaration
[DataMember]
public virtual ReasonStalled ReasonStalled { get; set; }
Property Value
Type Description
ReasonStalled
See Also
ISaleAgent

ReopenDate

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

Declaration
[DataMember]
public virtual DateTime ReopenDate { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

SaleId

Primary key

Declaration
[DataMember]
public virtual int SaleId { get; set; }
Property Value
Type Description
int
See Also
ISaleAgent

SaleStakeholders

Partial SaleEntity class associating the generated SaleEntity with an interface.

Declaration
[DataMember]
public virtual SaleStakeholder[] SaleStakeholders { get; set; }
Property Value
Type Description
SaleStakeholder[]
See Also
ISaleAgent

SaleText

Text describing the sale

Declaration
[DataMember]
public virtual string SaleText { get; set; }
Property Value
Type Description
string
See Also
ISaleAgent

SaleType

Use MDO List name "saletype" to get list items.

Declaration
[DataMember]
public virtual SaleType SaleType { get; set; }
Property Value
Type Description
SaleType
See Also
ISaleAgent

Saledate

(expected / lost / won) sales date

Declaration
[DataMember]
public virtual DateTime Saledate { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

Source

The sale source

Use MDO List name "source" to get list items.

Declaration
[DataMember]
public virtual Source Source { get; set; }
Property Value
Type Description
Source
See Also
ISaleAgent

Status

The state of the Sale: Open / Sold / Lost / Stalled

Declaration
[DataMember]
public virtual SaleStatus Status { get; set; }
Property Value
Type Description
SaleStatus
See Also
ISaleAgent

UpdatedBy

Who updated the sale

Declaration
[DataMember]
public virtual Associate UpdatedBy { get; set; }
Property Value
Type Description
Associate
See Also
ISaleAgent

UpdatedDate

Last updated in UTC.

Declaration
[DataMember]
public virtual DateTime UpdatedDate { get; set; }
Property Value
Type Description
DateTime
See Also
ISaleAgent

UserDefinedFields

Deprecated: Use CustomFields instead. Dictionary of user defined field data. The key string is the ProgId of the UdefField, or if the ProgId is empty it is a string of the format "SuperOffice:[UdefFieldIdentity]", e.g. "SuperOffice:1234"

Declaration
[DataMember]
public StringDictionary UserDefinedFields { get; set; }
Property Value
Type Description
StringDictionary
See Also
ISaleAgent

VisibleFor

The set of users or groups the record is visible for

Declaration
[DataMember]
public VisibleFor[] VisibleFor { get; set; }
Property Value
Type Description
VisibleFor[]
See Also
ISaleAgent

Methods

ToString()

Returns the carrier contents as a formatted string.

Declaration
public override string ToString()
Returns
Type Description
string

The carrier contents.

See Also
ISaleAgent

ToString(string)

Returns the carrier contents as a formatted string, useful for debugging. Each line in the output is prefixed with the input value.

Declaration
public string ToString(string prefix)
Parameters
Type Name Description
string prefix

The line prefix (typically used for indenting)

Returns
Type Description
string

The carrier contents.

See Also
ISaleAgent

Implements

IRelationEntityCarrier
ILinksContainerEntityCarrier
IProjectRelationEntityCarrier
IContactPersonRelationEntityCarrier
IEntityCarrier
IUdefFieldCarrier
IExtraFieldCarrier
IPublishedCarrier
IVisibleForCarrier

See Also

ISaleAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top