Write the following code in form
[Form]
public class NEWFORMNAME extends FormRun
{
NumberSeqFormHandler numberSeqFormHandler;
public void close()
{
if (numberSeqFormHandler)
{
numberSeqFormHandler.formMethodClose();
}
super();
}
NumberSeqFormHandler numberSeqFormHandler()
{
if (!numberSeqFormHandler)
{
numberSeqFormHandler =NumberSeqFormHandler::newForm(NumberSeqReference::findReference(extendedtypenum(EDTNAME)).NumberSequenceId,
element,
TABLENAME_ds,fieldnum(TABLENAME,FIELDNAME));
}
return numberSeqFormHandler;
}
[DataSource]
class TABLENAME
{
public void linkActive()
{
element.numberSeqFormHandler().formMethodDataSourceLinkActive();
super();
}
public void delete()
{
element.numberSeqFormHandler().formMethodDataSourceDelete();
super();
}
public boolean validateWrite()
{
boolean ret;
ret = super();
ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret;
return ret;
}
public void write()
{
super();
element.numberSeqFormHandler().formMethodDataSourceWrite();
}
public void create(boolean _append = false)
{
element.numberSeqFormHandler().formMethodDataSourceCreatePre();
super(_append);
element.numberSeqFormHandler().formMethodDataSourceCreate(true);
}
}
}