Options

Creating autonumber in a grid

thomaslp76thomaslp76 Member Posts: 5
edited 2005-07-21 in Dynamics AX
Hello,
I have created a method that extracts a number from a numbersequence.
I have a Grid control on my form and the grid has a datasource. I have made a create method (event catch) on the table. How do I insert the number from the numbersequence automatically when ctrl+n is pressed. I tried with the following code but that does not work:

NumberSeq seq;
Sagsnummer nr;
FormStringControl felt2;
seq = NumberSeq::newGetNum(NumberSequenceReference::find(TypeId2extendedTypeId(typeid(Sagsnummer))));
nr = seq.num();
felt2 = element.control(control::HelloWorld_nummer);
felt2.text(""+nr);
Sign In or Register to comment.