web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

X++ job to get list of Number sequences that are set to continuous

Chaitanya Golla Profile Picture Chaitanya Golla 17,225

Hi,

Following job helps us to get the list of number sequences(along with module and format) that were set to continuous(by default) by Ax.Continuity is defined on the datatype(like SalesId, PurchId etc) in a given module.

static void NumberSeq(Args _args)
{
    NumberSequenceScope numberSeqScope;
    NumberSequenceTable numberSeqTable;
    NumberSequenceReference  numberSeqRef;
    NumberSequenceDatatype   numberSeqType;

    while select numberSeqTable
        where numberSeqTable.Continuous == true
        join numberSeqRef
        where numberSeqRef.NumberSequenceId == numberSeqTable.RecId
        join numberSeqType
        where numberSeqType.RecId == numberSeqRef.NumberSequenceDatatype
        && numberSeqType.WizardContinuous == true
       // && numberSeqType.DatatypeId == 123
       // && numberSeqType.Module == 0
        join numberSeqScope
        where numberSeqScope.RecId == numberSeqRef.NumberSequenceScope
        && numberSeqScope.DataArea == "dat"
    {
        info(strFmt("Module: %1, Sequence: %2, Format: %3", numberSeqRef.referenceModuleLabel(), numberSeqTable.NumberSequence, numberSeqTable.Format));
    }
}


Comments

*This post is locked for comments