Add Serial number field to any table and increment that according to Different Name

Code:

public void modifiedField(FieldId _fieldId)
{
FormLetterRemarks formLetterRemarks;
super(_fieldId);
select count(FormLetter) from formLetterRemarks where formLetterRemarks.FormLetter == this.FormLetter;
if(formLetterRemarks.FormLetter == 0)
{
this.Seq_Number = 1;
}
else
{
this.Seq_Number = formLetterRemarks.FormLetter + 1;
}
}

OUTPUT

  • For Packing Slip it starts from 1
  • For Invoice also it starts from 1

Sequence

Advertisements