Class SaleEntity
Partial SaleEntity class associating the generated SaleEntity with an interface.
Implements
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
Properties
ActiveErpLinks
The number of active erp links
Declaration
[DataMember]
public virtual int ActiveErpLinks { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
ActiveLinks
Number of active links to sale, document, appointment.
Declaration
[DataMember]
public virtual int ActiveLinks { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
Amount
Total sale amount
Declaration
[DataMember]
public virtual double Amount { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
See Also
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
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
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
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
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
CreatedBy
Who created to sale
Declaration
[DataMember]
public virtual Associate CreatedBy { get; set; }
Property Value
| Type | Description |
|---|---|
| Associate |
See Also
CreatedDate
Registered date in UTC.
Declaration
[DataMember]
public virtual DateTime CreatedDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
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
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
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:
|
| User defined field data |
[Prog-id name]
Example:
|
See Also
Earning
Earning on sale
Declaration
[DataMember]
public virtual double Earning { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
See Also
EarningPercent
Earning as percent of total
Declaration
[DataMember]
public virtual double EarningPercent { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
See Also
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
Heading
Sale heading (short description?)
Declaration
[DataMember]
public virtual string Heading { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
IsPublished
Publication is published
Declaration
[DataMember]
public bool IsPublished { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
Links
List of all elements linked to the sale.
Declaration
[DataMember]
public virtual Link[] Links { get; set; }
Property Value
| Type | Description |
|---|---|
| Link[] |
See Also
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
Number
Alphanumeric user field
Declaration
[DataMember]
public virtual string Number { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
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
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
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
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
PublishEventDate
Publish event date
Declaration
[DataMember]
public DateTime PublishEventDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
PublishFrom
Publication valid from (inclusive)
Declaration
[DataMember]
public DateTime PublishFrom { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
PublishTo
Publication valid to (inclusive)
Declaration
[DataMember]
public DateTime PublishTo { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
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
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
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
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
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
SaleId
Primary key
Declaration
[DataMember]
public virtual int SaleId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
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
SaleText
Text describing the sale
Declaration
[DataMember]
public virtual string SaleText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
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
Saledate
(expected / lost / won) sales date
Declaration
[DataMember]
public virtual DateTime Saledate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
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
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
UpdatedBy
Who updated the sale
Declaration
[DataMember]
public virtual Associate UpdatedBy { get; set; }
Property Value
| Type | Description |
|---|---|
| Associate |
See Also
UpdatedDate
Last updated in UTC.
Declaration
[DataMember]
public virtual DateTime UpdatedDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
See Also
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
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
Methods
ToString()
Returns the carrier contents as a formatted string.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The carrier contents. |
See Also
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. |