I have a problem with the sales lines and a own created table.
The situation is as follow:
Order form (sales header and sales lines table)
- Default on the sales line subform the autosplitkey is true for "Line No." also the property "delayed insert" is default set to yes. (this must stay so because otherwise the focus goes to the subform)
- Now the problem is on the onvalidate trigger of the quantity, I must add some lines to a own created table and this table contains also the "document type", "document No.", "Line No." form the sales line table. But everytime i does this the line number is still on '0'. This is because the delayed insert, the record is'nt saved yet and there is no splitkey generated yet. How can i force (in code) to generate the splitkey to copie to my table?
Kind regards,
Pieter
0
Answers
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I've created a function that run on the "Sales Line" table ("Oninsert", "OnModify" and "OnDelete" trigger) when "xRec.Quantity <> Rec.Quantity", in this function I run my code and is the "Line No." filled in.
Thanks
When doing development, always try to find a similar piece of fuctionality in default NAV, see how they solved it ... and try to use the same method.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
please can you tell me the mystery behind this "xrec<>rec",i have seen it used so many places!
GD
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
i know this ,i want to know at the database level,how does Navision actually do this comparison,does it use any buffers and where does it store them,the Technical details please
GD
C/SIDE makes this version available to you (it is not an extra database call).
You should do the comparison, to avoid to make unnecessary database calls.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog