Class SaleCollection
Sales
For every Sale record edited through the SuperOffice GUI, a copy of the previous version of the record will be saved in the SaleHist table. This also applies to editing done through the SaleModel COM interface, but not to editing done through the OLE DB Provider or other channels.
Collection of Sale. Each element of the collection represents one entity based on Sale.Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public class SaleCollection : EntityCollectionBase, INestedPersist, IEnumerable<INestedPersist>, INotifyCollectionChanged, IBindingList, IList, ICollection, IEnumerable
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
Constructors
SaleCollection(SaleCollectionIdx)
Constructor for class SaleCollection.
This object represents a collection of rows in table 'sale'.
Table contact: Sales
Declaration
protected SaleCollection(SaleCollection.SaleCollectionIdx idx)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleCollection.SaleCollectionIdx | idx |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
Fields
_idx
Fetcher class the collection is based on
Declaration
protected SaleCollection.SaleCollectionIdx _idx
Field Value
| Type | Description |
|---|---|
| SaleCollection.SaleCollectionIdx |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
_rows
Row objects that the collection is based on.
Declaration
protected SaleRows _rows
Field Value
| Type | Description |
|---|---|
| SaleRows |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
Properties
Index
Retrieve the index for SaleCollection
Declaration
public SaleCollection.SaleCollectionIdx Index { get; }
Property Value
| Type | Description |
|---|---|
| SaleCollection.SaleCollectionIdx |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
this[int]
Get a Sale from the collection from its zero-based index.
Declaration
public Sale this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Zero-based index in the collection. |
Property Value
| Type | Description |
|---|---|
| Sale |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
Rows
The ecapsulated object SaleRows.
Declaration
public SaleRows Rows { get; }
Property Value
| Type | Description |
|---|---|
| SaleRows |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
Sentries
The collection of sentries that are guarding this collection of rows. This collection is used by RDB entities which return HDB collections.
For example, the contact.Faxes returns a PhoneRows collection in which each row will need to check the contact's sentry for permission to read/write their field
Declaration
public override SentryCollection Sentries { get; }
Property Value
| Type | Description |
|---|---|
| SentryCollection |
Overrides
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
Methods
Add(Sale)
Add one Sale to the collection.
Declaration
public int Add(Sale sale)
Parameters
| Type | Name | Description |
|---|---|---|
| Sale | sale | An instance of Sale to be added to the collection. |
Returns
| Type | Description |
|---|---|
| int | The index of the added Sale. |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
AddNew()
Get a new instance of Sale added to the collection.
Declaration
public Sale AddNew()
Returns
| Type | Description |
|---|---|
| Sale | A new instance of Sale added to the collection. |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
CreateChild()
Create a new instance of Sale
Declaration
protected override EntityBase CreateChild()
Returns
| Type | Description |
|---|---|
| EntityBase | New instance of Sale |
Overrides
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
CreateNew()
Create a new instance of the SaleCollection.
Declaration
public static SaleCollection CreateNew()
Returns
| Type | Description |
|---|---|
| SaleCollection | A new instance of the SaleCollection. |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
GetFromCustomSearch(CustomSearch)
Create a new instance of the SaleCollection object, and populate it with data from a custom search. If the search returns no results, an empty collection will be returned; if the result contains rows, a collection of SaleRow objects representing each row will be returned.
Declaration
public static SaleCollection GetFromCustomSearch(SaleCollection.CustomSearch query)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleCollection.CustomSearch | query | The custom search to execute against the database |
Returns
| Type | Description |
|---|---|
| SaleCollection | A new instance of the SaleCollection object, reflecting the result of the query. |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
GetFromCustomSearchAsync(CustomSearch, CancellationToken)
Create a new instance of the SaleCollection object, and populate it with data from a custom search. If the search returns no results, an empty collection will be returned; if the result contains rows, a collection of SaleRow objects representing each row will be returned.
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
public static Task<SaleCollection> GetFromCustomSearchAsync(SaleCollection.CustomSearch query, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleCollection.CustomSearch | query | The custom search to execute against the database |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | A new instance of the SaleCollection object, reflecting the result of the query. |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
GetFromIdxAssociateIdContactIdSaledateAsync(int, int, DateTime, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxAssociateIdContactIdSaledateAsync(int associateId, int contactId, DateTime saledate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | Owning associate |
| int | contactId | Optional contact reference |
| DateTime | saledate | (expected | lost | won) sales date |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index ICont_idSaledateAssoc_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxAssociateIdDoneSaledateAsync(int, SaleDone, DateTime, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxAssociateIdDoneSaledateAsync(int associateId, SaleDone done, DateTime saledate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | Owning associate |
| SaleDone | done | Done (0 = don’t know.ToSaleCollectionAsync(cancellationToken); 1 = No.ToSaleCollectionAsync(cancellationToken); 2 = yes) |
| DateTime | saledate | (expected | lost | won) sales date |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IAssoc_idDoneSaledate. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxContactIdAsync(int, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxContactIdAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | Optional contact reference |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleCont_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxDoneAsync(SaleDone, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxDoneAsync(SaleDone done, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleDone | done | Done (0 = don’t know.ToSaleCollectionAsync(cancellationToken); 1 = No.ToSaleCollectionAsync(cancellationToken); 2 = yes) |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleDone. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxHeadingAsync(string, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxHeadingAsync(string heading, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | heading | Sale heading (short description) |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleHeading. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxNumber1Async(string, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxNumber1Async(string number1, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | number1 | Alphanumeric user field |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleNum1. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxPersonIdAsync(int, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxPersonIdAsync(int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | Optional person reference |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSalePers_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxProjectIdAssociateIdSaledateAsync(int, int, DateTime, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxProjectIdAssociateIdSaledateAsync(int projectId, int associateId, DateTime saledate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | Optional project reference |
| int | associateId | Owning associate |
| DateTime | saledate | (expected | lost | won) sales date |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IProj_idSaledateAssoc_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxProjectIdAsync(int, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxProjectIdAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | Optional project reference |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleProj_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxSaledateAsync(DateTime, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxSaledateAsync(DateTime saledate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | saledate | (expected | lost | won) sales date |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleSaledate. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxSourceAsync(short, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxSourceAsync(short source, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| short | source | For future integration use.ToSaleCollectionAsync(cancellationToken); source of record |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleSource. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxStatusAsync(SaleStatus, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxStatusAsync(SaleStatus status, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaleStatus | status | Status (open, closed, lost) |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleStatus. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxUserdef2IdAsync(int, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxUserdef2IdAsync(int userdef2Id, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userdef2Id | User-defined fields reference |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleUdef2_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
GetFromIdxUserdefIdAsync(int, CancellationToken)
Create a new instance of the SaleRows object, and populate it with SaleRow objects based on the result of a query on the table Sale. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Task<SaleCollection> GetFromIdxUserdefIdAsync(int userdefId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userdefId | User-defined fields reference |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<SaleCollection> | New SaleRows collection containing the result of the index query. If no rows matched, the collection will be empty. |
Remarks
The query matches the fields on the non-unique index IDXSaleUdef_id. Unique indexes have corresponding Create methods directly on the SaleRow object, since such indexes always return zero or one rows.
Remove(Sale)
Removes the given Sale from the collection
Declaration
public void Remove(Sale sale)
Parameters
| Type | Name | Description |
|---|---|---|
| Sale | sale | the Sale to be removed |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
ToArray()
Sales
For every Sale record edited through the SuperOffice GUI, a copy of the previous version of the record will be saved in the SaleHist table. This also applies to editing done through the SaleModel COM interface, but not to editing done through the OLE DB Provider or other channels.
Collection of Sale. Each element of the collection represents one entity based on Sale.Declaration
public Sale[] ToArray()
Returns
| Type | Description |
|---|---|
| Sale[] |
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |
ToString()
For debugging: Number of members, and the first (up to) 5 items
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Remarks
Entity collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type SuperOffice.CRM.Rows.Sale to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) SaleCollection SaleCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
| Index fields | Nested index class name |
|---|---|
| SaleId | SaleId: Primary key Nested index class: Sale.IdxSaleIdStatic Get method: GetFromIdxSaleIdAsync(int, CancellationToken) |
| Index fields | Nested index class name |
|---|---|
| Status | Status: Status (open, closed, lost) Nested index class: SaleCollection.IdxStatusStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxStatus |
| Done | Done: Done (0 = don’t know; 1 = No; 2 = yes) Nested index class: SaleCollection.IdxDoneStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxDone |
| UserdefId | UserdefId: User-defined fields reference Nested index class: SaleCollection.IdxUserdefIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdefId |
| Userdef2Id | Userdef2Id: User-defined fields reference Nested index class: SaleCollection.IdxUserdef2IdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxUserdef2Id |
| ProjectId | ProjectId: Optional project reference Nested index class: SaleCollection.IdxProjectIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectId |
| Source | Source: For future integration use; source of record Nested index class: SaleCollection.IdxSourceStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSource |
| Heading | Heading: Sale heading (short description) Nested index class: SaleCollection.IdxHeadingStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxHeading |
| ProjectId, AssociateId, Saledate | ProjectId: Optional project reference AssociateId:Owning associate Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxProjectIdAssociateIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxProjectIdAssociateIdSaledate |
| PersonId | PersonId: Optional person reference Nested index class: SaleCollection.IdxPersonIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxPersonId |
| AssociateId, Done, Saledate | AssociateId: Owning associate Done:Done (0 = don’t know; 1 = No; 2 = yes) Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdDoneSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdDoneSaledate |
| ContactId | ContactId: Optional contact reference Nested index class: SaleCollection.IdxContactIdStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxContactId |
| Saledate | Saledate: (expected | lost | won) sales date Nested index class: SaleCollection.IdxSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxSaledate |
| Number1 | Number1: Alphanumeric user field Nested index class: SaleCollection.IdxNumber1Static Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxNumber1 |
| AssociateId, ContactId, Saledate | AssociateId: Owning associate ContactId:Optional contact reference Saledate:(expected | lost | won) sales date Nested index class: SaleCollection.IdxAssociateIdContactIdSaledateStatic Get method: SuperOffice.CRM.Entities.SaleCollection.GetFromIdxAssociateIdContactIdSaledate |