display data in a form

How can I filter data in form 5107, to show only the last version of a Sales Order? I want to see only the last version of each sales order.


In Standard-NAV I think there is now way to do this. You could insert a new field into Table 5107 (for example) called “Highest Version” and in the sales archiving cu you could then set this field to false for all existing versions and true for the new inserted version. Then you would be able to filter for this field on the form…

I will explain better what I reaaly need:

I have on form 207 a new field (No.) This field is on table 207 too with table relation property =“Sales Header Archive”.No. WHERE (No.=CONST(ORDER))

My idear is when I create a new record in 207 form, in field No., when I look up I want to see in Form 5161 (Sales Header Archive) only the last version of eash Sales Header Archive, get the last record for each No. with Find(+), but i am not sure how to do it and where to do it.

I thoungh may be on LookUp triger form field. :frowning:

Did you copy and paste your table relation? Because then you would filter for a Sales Header Archive-Entry with a Number = “Order”?

Is there any “important” information on the last version of the sales header archive? An information that (for example) the first version lacks? Or can you achieve your goal by just setting the relationsship to “Sales Header”? Because there you would only get one entry for each sales order.

Besides: what I wrote above would still work. Because in that case you would design the standard lookup form to only show the last version of each sales header archive entry and that would work too when you lookup from a different table.