How to use generated number sequence in table instead of form
NOTE : Before starting, you must know how to generate a new number sequence. You can check with the below link if you don't know already.
Generating a new number sequence
Generating a new number sequence
- Very first thing you need to do is create a field in your table with the same data type as in your number sequence. Now go to the properties of newly created field and specify the EDT of number sequence.
- Suppose, you've generated number sequence in HR module then create a new method in HRMParameters table. If you've generated number sequence in Customer module then create new method in CustParameters table. Similary if you've generated number sequence in any other module then check respective parameter table and create a new method there.
- Write the following code in your method.
Code:
client server static NumberSequenceReference methodNamme()
{
return NumberSeqReference::findReference(extendedTypeNum(Your Number Sequence EDT name));
}
public void initValue()
{
NumberSeq numSeq;
super();
numSeq = NumberSeq::newGetNum(HRMParameters::numRefDemo());
this.Offer=numSeq.num();
}
- Now open your table and check by creating new record.
- Now you don't need to write code in form to generate number sequence.