Hi ,
Today i would like to share you how to create Number sequence in Table level in Ax 2009.
Step 1:
Create an EDT SheetID
Step 2:
NumberSequenceReferences stores all the references and their corresponding numberseq codes
For an Example, create NumberSequence Reference under Accounts Payable Module
Go to AOT->Classes->NumberSeqReference_Vendor
Step 3:
Write a piece of code in loadmodule() of NumberSeqReference_Vendor class
numRef.DataTypeId = typeId2ExtendedTypeId(typeid(SheetId));
numRef.ReferenceHelp = literalstr("Unique key, allocated to a Presentation");
numRef.WizardContinuous = false;
numRef.WizardManual = NoYes::No;
numRef.WizardAllowChangeDown = NoYes::No;
numRef.WizardAllowChangeUp = NoYes::No;
numRef.SortField = 12;
this.create(numRef);
Step 4:
Override the initValue() in Table (Eg:SheetTable)
public void initValue()
{
NumberSeq NumSeq;
;
super();
NumSeq = NumberSeq::newGetNum(SheetTable::numRefSheetId(),true);
this.SheetId = NumSeq.num();
}
create a new method to get NumRefID
public client server static NumberSequenceReference numRefSheetId()
{
;
return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(sheetId)));
}
Step 5:
Go to Basic->Setup->Number Sequence->Number sequence
Press Ctrl+N and create a new NumberSequenceCode
For an example i have created a code - KOR_123
Step 6:
Go to AccountPayable->Setup->Parameter
Click NumberSequence Tab
Output:
Happy Daxing...
Today i would like to share you how to create Number sequence in Table level in Ax 2009.
Step 1:
Create an EDT SheetID
Step 2:
NumberSequenceReferences stores all the references and their corresponding numberseq codes
For an Example, create NumberSequence Reference under Accounts Payable Module
Go to AOT->Classes->NumberSeqReference_Vendor
Step 3:
Write a piece of code in loadmodule() of NumberSeqReference_Vendor class
numRef.DataTypeId = typeId2ExtendedTypeId(typeid(SheetId));
numRef.ReferenceHelp = literalstr("Unique key, allocated to a Presentation");
numRef.WizardContinuous = false;
numRef.WizardManual = NoYes::No;
numRef.WizardAllowChangeDown = NoYes::No;
numRef.WizardAllowChangeUp = NoYes::No;
numRef.SortField = 12;
this.create(numRef);
Step 4:
Override the initValue() in Table (Eg:SheetTable)
public void initValue()
{
NumberSeq NumSeq;
;
super();
NumSeq = NumberSeq::newGetNum(SheetTable::numRefSheetId(),true);
this.SheetId = NumSeq.num();
}
create a new method to get NumRefID
public client server static NumberSequenceReference numRefSheetId()
{
;
return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(sheetId)));
}
Step 5:
Go to Basic->Setup->Number Sequence->Number sequence
Press Ctrl+N and create a new NumberSequenceCode
For an example i have created a code - KOR_123
Go to AccountPayable->Setup->Parameter
Click NumberSequence Tab
Output:
Happy Daxing...
No comments:
Post a Comment