Re: [Axapta-Knowledge-Village] How to add a calculated integer in a field programmaticaly without user input

2008-04-29 Thread Nitesh
Use Sequence class for auto generation of integer numbers

On Mon, Apr 28, 2008 at 1:00 PM, 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.

 



[Axapta-Knowledge-Village] How to add a calculated integer in a field programmaticaly without user input

2008-04-28 Thread jazib.abdulah
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.