Tableposition

I have a little problem, i used some keys and filters when i open a table. Now i have the problem the enterposition is at the end of the table and i had to scroll to the first position. How can i automaicly jump to the first entry when i open the table ?

FIND(’-’); in the OnOpenForm trigger.

Thanks, coding a hole day and suddenly simple things might be unmakable ;).

On second thought - was this really what you wanted, or did you just want to strip any saved filters and keys from the form? Putting this code into the form will always jump to the first record in the (possibly filtered) view.

sry to say, but if always the last record is selected when you open a form (table) you made a program error somewhere.

Thank you for the question [;)]! Why? Your question lead me to solve a very annoying behaviour within the G/l Entry form (with a simple Find(’+’)). While doing the day to day work the user doesn’t want to see the first record - he wants to see the last postings. Wonder why I didn’t solve this earlier [:(!]? Thank you again bye André

Andre! Wonder why I didn’t solve this earlier? I’ll tell you why! [;)] First, Every form has a propertie called : SourceTablePlacement Options First, Last, Record, Saved. Use this propertie to jump to the last record. But then again… This will course Navision to ALWAYS jump to the last record when openeing this form. I don’t really think you want this. This form can be (is) used by other parts in Navision. So maybe it’s best to open this form (with jump to last functionality) by C/AL code from only one point in Navision. Second, if you jump to the last G/L entry you will jump to the entry with the latest posting date. I think you want to jump to the entry with the highest EntryNo. But then you have to sort your form on the primairy key. This you don’t want… This will make the form very, very, very slow. Maybe not right now, but in time it sure will. So, best thing to do, is not do enything or create a function “Select latest entry Ctrl+L”.

Hi Emiel

quote:


Originally posted by eromein
… First, Every form has a propertie called : SourceTablePlacement Options First, Last, Record, Saved. …


Never noticed this! [xx(]

quote:


… Second, if you jump to the last G/L entry you will jump to the entry with the latest posting date. I think you want to jump to the entry with the highest EntryNo. But then you have to sort your form on the primairy key. This you don’t want… This will make the form very, very, very slow. Maybe not right now, but in time it sure will. So, best thing to do, is not do enything or create a function “Select latest entry Ctrl+L”. …


I want indeed jump to the last record (in most of the cases this should be the record with highest EntryNo). This main problem is IMHO Navision can’t remember where you was at the last time (in ledger entries). With every OpenForm the system jumps to the first record. This worked in the BLUE - version. I wonder why this is changed. For ledger entries forms (item, vendor, customer) IMHO another way makes no sense (for most of the users). Who wants to see the old records for years at first? A key starting with Nr. and Posting Date is IMHO the best way te show the entries. bye André

Mmmm… I just can’t figure out what makes Navision select the first record. G/L Account entries have some code in the OnFind and OnNext so that could be the reson. But all the other entries form do not have any code in thoses 2 triggers. All proprties are the way they should be. Could anybody tell me, pleas… How it’s possible the first record is selected? Or should I mail this question to the Lone Gunmen again.

quote:


A key starting with Nr. and Posting Date is IMHO the best way te show the entries.


quote = sure. btw, IMHO, is that short for In My Humble Opinion?

quote:


Originally posted by eromein
… btw, IMHO, is that short for In My Humble Opinion?


IMHO yes! [:D] It’s another way to say: I’m right! [;)] bye André

No, IMHO!