Add your code to set SeqNo in insert() method of your table. Steeve...
--- In Axapta-Knowledge-Village@yahoogroups.com, "jazib.abdulah" <[EMAIL PROTECTED]> wrote: > > Hi everybody > > I have a table named EmployeeDocuments with two fields > > EmployeeID (it is actually a ForeignKey to another table Employees). > SeqNo (It is an integer) > Both these fields collectively will make Primarykey for this table. > > What I want to do is whenever a new Row is added into EmployeeDocuments > table by the user. User should select only EmployeeID and I should add > a SeqNo programitically by counting total no of rows already present in > EmployeeDocuments table with the selected EmployeeID, Increment it with > one and put it in SeqNo field. > > How can I do it? > > Thanks for the help in advance. >