Hi There,
I'm trying to insert records in the Navision Item Journal through code. All works well except that the Line No. Field is a AutoSplitKey field that is handled by the Form... and I am not using the Form.
I am about to write some code in the OnInsert trigger of the Item Journal Line table too lookup the last Line No. in the table and then add 100000... but I can not believe that that is the way to do this... or is it?
Harm
PS: HAPPY NEW YEAR TO ANYONE READING THIS MESSAGE !
CANE Microsoft Solutions BV
Prins Hendrikplein 14
2518 JC DEN HAAG
The Netherlands
http://www.cane.nl 0
Comments
Afraid the answer is yes #-o.
I have never found any other way to do it but then I do not confess to know all there is to know about C/AL coding.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Maybe the OnInsert isn't the best place......
If you fill the table from only one point in Navision it's maybe better to fill the line no. from there.
If this isn't possible... Then you have to do it like you are doing it.
If it was hard to write, it should be hard to understand."
Take a look on Form 5198 Attendee Wizard Subform.
They implemented AutoSplitKey in C/AL there
Have fun!
Dmitry