Wednesday, August 20, 2014

How to create new Number Sequence in Ax 2009

Steps to Create Number Sequence in Ax 2009

Step - 1
Create an EDT just like i have created 'ReasonCode'

Step 2
Go to the Module Table : SalesParameters
Create a method:
public client server static NumberSequenceReference numRefReasonCode()
{;
    return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(ReasonCode)));

}

Step 3
Go to the module Class : NumberSeqReference_Customer
Select the LoadModule Method:
//Start
    numRef.DataTypeId                 = typeId2ExtendedTypeId(typeid(ReasonCode));
    numRef.ReferenceHelp            = literalstr("Reason Code");
    numRef.WizardContinuous         = False;
    numRef.WizardManual             = NoYes::No;
    numRef.WizardAllowChangeDown    = NoYes::No;
    numRef.WizardAllowChangeUp      = NoYes::No;
    numRef.WizardHighest            = 999999;
    numRef.SortField                = 418;
    this.create(numRef);  
//End

Step 4
Go to the Table :  Override initvalue method just like below
public void initValue()
{
    NumberSeq       NumSeq;
    ;
    super();
    NumSeq =  NumberSeq::newGetNum(SalesParameters::numRefReasonCode(),true);
    this.ReasonCode = NumSeq.num();
}

Step 5
Go to Module Parameter Form and select Number Sequence Tab, There is a line Created for Reason Code which is selected in Given Image


Step 6
Now Go To maint Table form of Number Sequence and Create a line for number sequence and select it for Reason Code as gshown in below image

Step 7
Now Your number sequence setting is up to date and you can create record in form as shown in below image

Thats All!!



Thanks






No comments:

Post a Comment

Customer transaction automatic settlement for specific customer groups only

Hi Friends, Recently I come to the requirement of my company where I have to automatic settle the customer transaction for the speci...