form

I am making a form where I want to have Serial number as my column.Is there any way to generate serial no automatically.Please reply asap.

Hi Mnra,

write the below code in the form dsatasource initvalue method.

public void initValue()

{

tablename table;

select maxof(LineNum) from table; //LineNum field in tablename table.

tablename.LineNum = table.LineNum+1;

tablename.insert();

super();

}

Thanx for the reply,I tried this but this is not giving the desired result.can u suggest me something else.

When should the serial no be generated automatically(i.e. event)?If you want to do the same at the time of record creation then you may use the existing number sequence functionality.

Let me know in case of any queries.

where can I find number sequence functionality? i want to have S no when ever I new record

You can find it on sales order or purchase order for SalesId,PurchId respectively.

Hi,

You have to generate Number sequence for it.

Refer http://www.amer-ax.com/2010/06/how-to-use-number-sequence-engine-efficiently/

Regards,

Kuppusamy S

Use Number sequence.