Class MailingsHistoryExtender
Extends the Mailings (s_shipment) provider with the current user's recently-visited history. Composed into MailingsExtenderBase via MailingsExtenderBase.Features.History, but it stays dormant — no join, no return field — until the ColHistoryRank column is actually requested (output, restriction or order-by). So the shared mailings lists (activity archives etc.) are unaffected, and only a caller that opts in (the "Recent" tab) pays for it.
The join is to the History table on record_id = shipment_id, restricted to the same (table_id, associate_id, extra_id) key the History business logic uses (see SuperOffice.Services.Implementation.HistoryImplementation GetHistorySelect). When the caller restricts on ColHistoryRank — as the Recent tab does — the join becomes an INNER join, so only recently-visited mailings are returned; otherwise it's a left-outer join that simply annotates each mailing with its rank (1 = most recent).
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class MailingsHistoryExtender : TableExtenderBase<HistoryTableInfo>, IArchiveProviderQueryMapping, IArchiveExtender, IArchiveProviderDoesExtend, IArchiveProviderHasColumns, IArchiveProviderExtensible
Constructors
MailingsHistoryExtender()
Extends the Mailings (s_shipment) provider with the current user's recently-visited history. Composed into MailingsExtenderBase via MailingsExtenderBase.Features.History, but it stays dormant — no join, no return field — until the ColHistoryRank column is actually requested (output, restriction or order-by). So the shared mailings lists (activity archives etc.) are unaffected, and only a caller that opts in (the "Recent" tab) pays for it.
The join is to the History table on record_id = shipment_id, restricted to the same (table_id, associate_id, extra_id) key the History business logic uses (see SuperOffice.Services.Implementation.HistoryImplementation GetHistorySelect). When the caller restricts on ColHistoryRank — as the Recent tab does — the join becomes an INNER join, so only recently-visited mailings are returned; otherwise it's a left-outer join that simply annotates each mailing with its rank (1 = most recent).
Declaration
public MailingsHistoryExtender()
Fields
ColHistoryRank
Extends the Mailings (s_shipment) provider with the current user's recently-visited history. Composed into MailingsExtenderBase via MailingsExtenderBase.Features.History, but it stays dormant — no join, no return field — until the ColHistoryRank column is actually requested (output, restriction or order-by). So the shared mailings lists (activity archives etc.) are unaffected, and only a caller that opts in (the "Recent" tab) pays for it.
The join is to the History table on record_id = shipment_id, restricted to the same (table_id, associate_id, extra_id) key the History business logic uses (see SuperOffice.Services.Implementation.HistoryImplementation GetHistorySelect). When the caller restricts on ColHistoryRank — as the Recent tab does — the join becomes an INNER join, so only recently-visited mailings are returned; otherwise it's a left-outer join that simply annotates each mailing with its rank (1 = most recent).
Declaration
public const string ColHistoryRank = "historyRank"
Field Value
| Type | Description |
|---|---|
| string |
_colHistoryRank
Extends the Mailings (s_shipment) provider with the current user's recently-visited history. Composed into MailingsExtenderBase via MailingsExtenderBase.Features.History, but it stays dormant — no join, no return field — until the ColHistoryRank column is actually requested (output, restriction or order-by). So the shared mailings lists (activity archives etc.) are unaffected, and only a caller that opts in (the "Recent" tab) pays for it.
The join is to the History table on record_id = shipment_id, restricted to the same (table_id, associate_id, extra_id) key the History business logic uses (see SuperOffice.Services.Implementation.HistoryImplementation GetHistorySelect). When the caller restricts on ColHistoryRank — as the Recent tab does — the join becomes an INNER join, so only recently-visited mailings are returned; otherwise it's a left-outer join that simply annotates each mailing with its rank (1 = most recent).
Declaration
protected ArchiveColumnInfo _colHistoryRank
Field Value
| Type | Description |
|---|---|
| ArchiveColumnInfo |
Methods
InnerModifyQuery()
Expose history.rank as an orderable/restrictable column.
Declaration
protected override void InnerModifyQuery()
Overrides
Remarks
Default ordering can't be forced from here: QueryProviderBase rebuilds the query's OrderBy from its OrderBySlots at finalize time, discarding any OrderBy added during query construction. The consuming list (the Recent tab) requests the sort on ColHistoryRank.
SetJoin()
Join the History table to the parent s_shipment, restricted to the current user's shipment history. INNER join when the caller restricts on ColHistoryRank (→ only recent mailings), left-outer otherwise (→ all mailings, annotated with rank).
Declaration
protected override HistoryTableInfo SetJoin()
Returns
| Type | Description |
|---|---|
| HistoryTableInfo |