Member Junction
    Preparing search index...

    Interface IDocumentNumberPolicy

    interface IDocumentNumberPolicy {
        dateSourceField?: string;
        fiscalYearStartMonth?: number;
        gapFreeTransactional?: boolean;
        immutableAfterCreate?: boolean;
        incrementBy?: number;
        manualValueMode?: ManualNumberPolicy;
        pattern: string;
        prefix?: string;
        resetPeriod?: DocumentResetPeriod;
        scopeByTenant?: boolean;
        scopeFieldFallbacks?: Record<string, string>;
        scopeFields?: string[];
        sequenceKey?: string;
        startAt?: number;
        targetField: string;
    }
    Index

    Properties

    dateSourceField?: string

    Optional Date/ISO field on the entity used to derive {YYYY}, {MM}, {DD}, {FY}, and resetPeriod.

    fiscalYearStartMonth?: number

    Starting month (1..12) of the fiscal year when {FY} or resetPeriod: 'FiscalYear' is used. Default 1.

    gapFreeTransactional?: boolean

    Default true: wrap standalone DatabaseProviderBase.Save() in an EntityTransactionScope for rollback safety.

    immutableAfterCreate?: boolean

    Default true: once saved, targetField cannot be modified on subsequent updates.

    incrementBy?: number

    Step size added on each subsequent allocation. Default 1.

    manualValueMode?: ManualNumberPolicy

    Policy for caller-supplied values on unsaved records. Default 'AllowNonColliding'.

    pattern: string

    Pattern template, e.g. '{PREFIX}-{YYYY}-{SEQ:4}' or '{Field:AppScope:UPPER:ISS}-{SEQ:1}'.

    prefix?: string

    Static prefix substituted for {PREFIX}.

    resetPeriod?: DocumentResetPeriod

    Counter reset cadence. Default 'Never'.

    scopeByTenant?: boolean

    When true, includes user.TenantContext.TenantID in the counter ScopeKey.

    scopeFieldFallbacks?: Record<string, string>

    Optional fallback string when a scopeFields entry is null or blank on the entity.

    scopeFields?: string[]

    Entity field names that partition the sequence into independent counters (e.g. ['CompanyID']).

    sequenceKey?: string

    Globally-unique counter identifier. Defaults to ${entityInfo.Name}.${targetField}. Multiple entities or fields can share one counter by specifying the same sequenceKey.

    startAt?: number

    First sequence integer allocated for a newly-initialized scope. Default 1.

    targetField: string

    Target string field on the entity to populate (e.g. 'OrderNumber', 'EntryNumber', 'IssueNumber').