Class SaleHistTableInfo
Table 'SaleHist': Mirror image of the Sale table, providing a full transaction history. Every time you edit a sale, the current record of the sale is also saved here.
Implements
Inherited Members
Namespace: SuperOffice.CRM.Data
Assembly: SoDataBase.dll
Syntax
[DatabaseTable("SaleHist")]
public class SaleHistTableInfo : TableInfo, ICloneable
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling
Fields
DictionaryTableName
Conceptual name of table SaleHist in the database dictionary: SaleHist
Declaration
public const string DictionaryTableName = "SaleHist"
Field Value
Type | Description |
---|---|
System.String |
Properties
ActiveLinks
Field 'activeLinks' in table 'SaleHist': Dictionary type UInt, .NET type: System.UInt32
Number of active links to documents and such
Declaration
public FieldInfo ActiveLinks { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Amount
Field 'amount' in table 'SaleHist': Dictionary type Double, .NET type: System.Double
Total sale amount
Declaration
public DoubleFieldInfo Amount { get; }
Property Value
Type | Description |
---|---|
DoubleFieldInfo |
AppointmentId
Field 'appointment_id' in table 'SaleHist': Dictionary type FK, target: Appointment, .NET type: System.Int32
For future use
Declaration
public Int32FieldInfo AppointmentId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
AppointmentId_InnerJoin_Appointment
Generated join from the foreign key AppointmentId in this table, to its target table AppointmentTableInfo.
Declaration
public TargetedInnerJoin<AppointmentTableInfo> AppointmentId_InnerJoin_Appointment { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AppointmentTableInfo> |
AssociateId
Field 'associate_id' in table 'SaleHist': Dictionary type FK, target: Associate, .NET type: System.Int32
Owning associate
Declaration
public Int32FieldInfo AssociateId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
AssociateId_InnerJoin_Associate
Generated join from the foreign key AssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> AssociateId_InnerJoin_Associate { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AssociateTableInfo> |
ComptrId
Field 'comptr_id' in table 'SaleHist': Dictionary type FK, target: Comptr, .NET type: System.Int32
Competitor
Declaration
public Int32FieldInfo ComptrId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ComptrId_InnerJoin_Comptr
Generated join from the foreign key ComptrId in this table, to its target table ComptrTableInfo.
Declaration
public TargetedInnerJoin<ComptrTableInfo> ComptrId_InnerJoin_Comptr { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ComptrTableInfo> |
ContactId
Field 'contact_id' in table 'SaleHist': Dictionary type FK, target: Contact, .NET type: System.Int32
Optional contact reference
Declaration
public Int32FieldInfo ContactId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ContactId_InnerJoin_Contact
Generated join from the foreign key ContactId in this table, to its target table ContactTableInfo.
Declaration
public TargetedInnerJoin<ContactTableInfo> ContactId_InnerJoin_Contact { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ContactTableInfo> |
CreditedId
Field 'credited_id' in table 'SaleHist': Dictionary type FK, target: Credited, .NET type: System.Int32
Who is to be credited for the sale
Declaration
public Int32FieldInfo CreditedId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
CreditedId_InnerJoin_Credited
Generated join from the foreign key CreditedId in this table, to its target table CreditedTableInfo.
Declaration
public TargetedInnerJoin<CreditedTableInfo> CreditedId_InnerJoin_Credited { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<CreditedTableInfo> |
CurrencyId
Field 'currency_id' in table 'SaleHist': Dictionary type FK, target: Currency, .NET type: System.Int32
Currency of sale
Declaration
public Int32FieldInfo CurrencyId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
CurrencyId_InnerJoin_Currency
Generated join from the foreign key CurrencyId in this table, to its target table CurrencyTableInfo.
Declaration
public TargetedInnerJoin<CurrencyTableInfo> CurrencyId_InnerJoin_Currency { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<CurrencyTableInfo> |
Definition
Definition of the table as described in the deployed runtime dictionary
Declaration
public override SoTable Definition { get; }
Property Value
Type | Description |
---|---|
SoTable |
Overrides
DictionaryTableNumber
Table number for table SaleHist in the database dictionary; potentially changes between databases, but always the same over the lifetime of any single database
Declaration
public int DictionaryTableNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Done
Field 'done' in table 'SaleHist': Dictionary type Enum, .NET type: SaleDone
Done (0=don't know, 1 = No, 2=Yes)
Declaration
public SaleDoneFieldInfo Done { get; }
Property Value
Type | Description |
---|---|
SaleDoneFieldInfo |
Earning
Field 'earning' in table 'SaleHist': Dictionary type Double, .NET type: System.Double
Earning on sale
Declaration
public DoubleFieldInfo Earning { get; }
Property Value
Type | Description |
---|---|
DoubleFieldInfo |
EarningPercent
Field 'earning_percent' in table 'SaleHist': Dictionary type Double, .NET type: System.Double
Earning as percent of total
Declaration
public DoubleFieldInfo EarningPercent { get; }
Property Value
Type | Description |
---|---|
DoubleFieldInfo |
GroupIdx
Field 'group_idx' in table 'SaleHist': Dictionary type FK, target: UserGroup, .NET type: System.Int32
Owner's group whn sale was created
Declaration
public Int32FieldInfo GroupIdx { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
GroupIdx_InnerJoin_UserGroup
Generated join from the foreign key GroupIdx in this table, to its target table UserGroupTableInfo.
Declaration
public TargetedInnerJoin<UserGroupTableInfo> GroupIdx_InnerJoin_UserGroup { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<UserGroupTableInfo> |
Heading
Field 'heading' in table 'SaleHist': Dictionary type String[220], .NET type: System.String
Sale heading (short description?)
Declaration
public StringFieldInfo Heading { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
LeftOuterJoin_VisibleFor_SaleHistId
Generated left outer join from the primary key SalehistId on this table, to VisibleFor.SaleHistId.
Declaration
public TargetedLeftOuterJoin<VisibleForTableInfo> LeftOuterJoin_VisibleFor_SaleHistId { get; }
Property Value
Type | Description |
---|---|
TargetedLeftOuterJoin<VisibleForTableInfo> |
NddAppointmentId
Field 'nddAppointment_id' in table 'SaleHist': Dictionary type FK, target: Appointment, .NET type: System.Int32
ID, can be 0, of the appointment that "caused" the nextDueDate
Declaration
public Int32FieldInfo NddAppointmentId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
NddAppointmentId_InnerJoin_Appointment
Generated join from the foreign key NddAppointmentId in this table, to its target table AppointmentTableInfo.
Declaration
public TargetedInnerJoin<AppointmentTableInfo> NddAppointmentId_InnerJoin_Appointment { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AppointmentTableInfo> |
NextDueDate
Field 'nextDueDate' in table 'SaleHist': Dictionary type DateTime, .NET type: System.DateTime
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
public DateTimeFieldInfo NextDueDate { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
Number1
Field 'number1' in table 'SaleHist': Dictionary type String[50], .NET type: System.String
Alphanumeric user field
Declaration
public StringFieldInfo Number1 { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
PersonId
Field 'person_id' in table 'SaleHist': Dictionary type FK, target: Person, .NET type: System.Int32
Optional person reference
Declaration
public Int32FieldInfo PersonId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
PersonId_InnerJoin_Person
Generated join from the foreign key PersonId in this table, to its target table PersonTableInfo.
Declaration
public TargetedInnerJoin<PersonTableInfo> PersonId_InnerJoin_Person { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<PersonTableInfo> |
PostitTextId
Field 'postitText_id' in table 'SaleHist': Dictionary type FK, target: Text, .NET type: System.Int32
Paperclip text
Declaration
public Int32FieldInfo PostitTextId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
PostitTextId_InnerJoin_Text
Generated join from the foreign key PostitTextId in this table, to its target table TextTableInfo.
Declaration
public TargetedInnerJoin<TextTableInfo> PostitTextId_InnerJoin_Text { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<TextTableInfo> |
Probability
Field 'probability' in table 'SaleHist': Dictionary type UShort, .NET type: System.Int16
Actual probability, may differ from the one in the list
Declaration
public UInt16FieldInfo Probability { get; }
Property Value
Type | Description |
---|---|
UInt16FieldInfo |
ProbabilityIdx
Field 'probability_idx' in table 'SaleHist': Dictionary type FK, target: Prob, .NET type: System.Int32
Pointer to probability list value
Declaration
public Int32FieldInfo ProbabilityIdx { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ProbabilityIdx_InnerJoin_Prob
Generated join from the foreign key ProbabilityIdx in this table, to its target table ProbTableInfo.
Declaration
public TargetedInnerJoin<ProbTableInfo> ProbabilityIdx_InnerJoin_Prob { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ProbTableInfo> |
ProjectId
Field 'project_id' in table 'SaleHist': Dictionary type FK, target: Project, .NET type: System.Int32
Optional project reference
Declaration
public Int32FieldInfo ProjectId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ProjectId_InnerJoin_Project
Generated join from the foreign key ProjectId in this table, to its target table ProjectTableInfo.
Declaration
public TargetedInnerJoin<ProjectTableInfo> ProjectId_InnerJoin_Project { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ProjectTableInfo> |
ReasonId
Field 'reason_id' in table 'SaleHist': Dictionary type FK, target: Reason, .NET type: System.Int32
Why we lost it
Declaration
public Int32FieldInfo ReasonId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ReasonId_InnerJoin_Reason
Generated join from the foreign key ReasonId in this table, to its target table ReasonTableInfo.
Declaration
public TargetedInnerJoin<ReasonTableInfo> ReasonId_InnerJoin_Reason { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ReasonTableInfo> |
ReasonSoldId
Field 'reasonSold_id' in table 'SaleHist': Dictionary type FK, target: ReasonSold, .NET type: System.Int32
Reason why we made the sale
Declaration
public Int32FieldInfo ReasonSoldId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ReasonSoldId_InnerJoin_ReasonSold
Generated join from the foreign key ReasonSoldId in this table, to its target table ReasonSoldTableInfo.
Declaration
public TargetedInnerJoin<ReasonSoldTableInfo> ReasonSoldId_InnerJoin_ReasonSold { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ReasonSoldTableInfo> |
ReasonStalledId
Field 'reasonStalled_id' in table 'SaleHist': Dictionary type FK, target: ReasonStalled, .NET type: System.Int32
If the status is stalled, it should be commented here
Declaration
public Int32FieldInfo ReasonStalledId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
ReasonStalledId_InnerJoin_ReasonStalled
Generated join from the foreign key ReasonStalledId in this table, to its target table ReasonStalledTableInfo.
Declaration
public TargetedInnerJoin<ReasonStalledTableInfo> ReasonStalledId_InnerJoin_ReasonStalled { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<ReasonStalledTableInfo> |
Registered
Field 'registered' in table 'SaleHist': Dictionary type UtcDateTime, .NET type: System.DateTime
Registered date
Declaration
public DateTimeFieldInfo Registered { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
RegisteredAssociateId
Field 'registered_associate_id' in table 'SaleHist': Dictionary type FK, target: Associate, .NET type: System.Int32
Registered by whom
Declaration
public Int32FieldInfo RegisteredAssociateId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
RegisteredAssociateId_InnerJoin_Associate
Generated join from the foreign key RegisteredAssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> RegisteredAssociateId_InnerJoin_Associate { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AssociateTableInfo> |
ReopenDate
Field 'reopenDate' in table 'SaleHist': Dictionary type DateTime, .NET type: System.DateTime
Date the sale is to be reopened; valid only for status=stalled. Not necessarily the same as the nextDueDate.
Declaration
public DateTimeFieldInfo ReopenDate { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
RuntimeDefinition
Definition of the table as described in the deployed runtime dictionary
Declaration
public static SoTable RuntimeDefinition { get; }
Property Value
Type | Description |
---|---|
SoTable |
Saledate
Field 'saledate' in table 'SaleHist': Dictionary type DateTime, .NET type: System.DateTime
(expected | lost | won) sales date
Declaration
public DateTimeFieldInfo Saledate { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
SalehistId
Field 'salehist_id' in table 'SaleHist': Dictionary type PK, .NET type: System.Int32
Primary key
Declaration
public Int32FieldInfo SalehistId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
SaleId
Field 'sale_id' in table 'SaleHist': Dictionary type FK, target: Sale, .NET type: System.Int32
The sale
Declaration
public Int32FieldInfo SaleId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
SaleId_InnerJoin_Sale
Generated join from the foreign key SaleId in this table, to its target table SaleTableInfo.
Declaration
public TargetedInnerJoin<SaleTableInfo> SaleId_InnerJoin_Sale { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<SaleTableInfo> |
SaleTypeCatId
Field 'saleTypeCat_id' in table 'SaleHist': Dictionary type FK, target: SaleTypeCat, .NET type: System.Int32
Category of sale type, slaved from saletype
Declaration
public Int32FieldInfo SaleTypeCatId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
SaleTypeCatId_InnerJoin_SaleTypeCat
Generated join from the foreign key SaleTypeCatId in this table, to its target table SaleTypeCatTableInfo.
Declaration
public TargetedInnerJoin<SaleTypeCatTableInfo> SaleTypeCatId_InnerJoin_SaleTypeCat { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<SaleTypeCatTableInfo> |
SaleTypeId
Field 'saleType_id' in table 'SaleHist': Dictionary type FK, target: SaleType, .NET type: System.Int32
Link to list, sale type (big sale, small sale, no-process sale, ...)
Declaration
public Int32FieldInfo SaleTypeId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
SaleTypeId_InnerJoin_SaleType
Generated join from the foreign key SaleTypeId in this table, to its target table SaleTypeTableInfo.
Declaration
public TargetedInnerJoin<SaleTypeTableInfo> SaleTypeId_InnerJoin_SaleType { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<SaleTypeTableInfo> |
Source
Field 'source' in table 'SaleHist': Dictionary type UShort, .NET type: System.Int16
For future integration use; source of record
Declaration
public UInt16FieldInfo Source { get; }
Property Value
Type | Description |
---|---|
UInt16FieldInfo |
SourceId
Field 'source_id' in table 'SaleHist': Dictionary type FK, target: Source, .NET type: System.Int32
Source of order
Declaration
public Int32FieldInfo SourceId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
SourceId_InnerJoin_Source
Generated join from the foreign key SourceId in this table, to its target table SourceTableInfo.
Declaration
public TargetedInnerJoin<SourceTableInfo> SourceId_InnerJoin_Source { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<SourceTableInfo> |
Status
Field 'status' in table 'SaleHist': Dictionary type Enum, .NET type: SaleStatus
Status (open, closed, lost)
Declaration
public SaleStatusFieldInfo Status { get; }
Property Value
Type | Description |
---|---|
SaleStatusFieldInfo |
TextId
Field 'text_id' in table 'SaleHist': Dictionary type FK, target: Text, .NET type: System.Int32
Optional long description
Declaration
public Int32FieldInfo TextId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
TextId_InnerJoin_Text
Generated join from the foreign key TextId in this table, to its target table TextTableInfo.
Declaration
public TargetedInnerJoin<TextTableInfo> TextId_InnerJoin_Text { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<TextTableInfo> |
Updated
Field 'updated' in table 'SaleHist': Dictionary type UtcDateTime, .NET type: System.DateTime
Last updated
Declaration
public DateTimeFieldInfo Updated { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
UpdatedAssociateId
Field 'updated_associate_id' in table 'SaleHist': Dictionary type FK, target: Associate, .NET type: System.Int32
Last updated by whom
Declaration
public Int32FieldInfo UpdatedAssociateId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
UpdatedAssociateId_InnerJoin_Associate
Generated join from the foreign key UpdatedAssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> UpdatedAssociateId_InnerJoin_Associate { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AssociateTableInfo> |
UpdatedCount
Field 'updatedCount' in table 'SaleHist': Dictionary type UShort, .NET type: System.Int16
Number of updates made to this record
Declaration
public UInt16FieldInfo UpdatedCount { get; }
Property Value
Type | Description |
---|---|
UInt16FieldInfo |
Userdef2Id
Field 'userdef2_id' in table 'SaleHist': Dictionary type FK, target: UDSaleLarge, .NET type: System.Int32
User-defined fields reference
Declaration
public Int32FieldInfo Userdef2Id { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
Userdef2Id_InnerJoin_UDSaleLarge
Generated join from the foreign key Userdef2Id in this table, to its target table UDSaleLargeTableInfo.
Declaration
public TargetedInnerJoin<UDSaleLargeTableInfo> Userdef2Id_InnerJoin_UDSaleLarge { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<UDSaleLargeTableInfo> |
UserdefId
Field 'userdef_id' in table 'SaleHist': Dictionary type FK, target: UDSaleSmall, .NET type: System.Int32
User-defined fields reference
Declaration
public Int32FieldInfo UserdefId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
UserdefId_InnerJoin_UDSaleSmall
Generated join from the foreign key UserdefId in this table, to its target table UDSaleSmallTableInfo.
Declaration
public TargetedInnerJoin<UDSaleSmallTableInfo> UserdefId_InnerJoin_UDSaleSmall { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<UDSaleSmallTableInfo> |
Visibility
Field 'visibility' in table 'SaleHist': Dictionary type UShort, .NET type: System.Int16
Obsolete, but still maintained denormalization of visiblefor
Declaration
public UInt16FieldInfo Visibility { get; }
Property Value
Type | Description |
---|---|
UInt16FieldInfo |