Run a form in insert mode?

tompynation
Member Posts: 398
How can i run a form on a click off a button, the form should open without showing a record...
So it should be ready to insert a new record.
If i just do FORM.RUNMODAL('myform'), then it shows the first record of the table and i still have to press F3 to insert...
So it should be ready to insert a new record.
If i just do FORM.RUNMODAL('myform'), then it shows the first record of the table and i still have to press F3 to insert...
0
Answers
-
Is it so much work for the user to hit F3?
Remember : each line of extra code will make it more difficult for a later upgrade. And the usefulness of showing a new record on opening the form seems very limited.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
no its not difficult to press F3, but i open this form by Pressing on a button 'New'
So its pretty stupid that when you press 'New' and then see the form to insert that you still have to press F3 to be able to insert...0 -
allright, i solved it otherwise. i already insert when pressing the 'New' button and then i just show this newly inserted record where just the ID is filled in.0
-
Hi tompynation,
Be careful with this approach - it can leave a lot of blank record on your table if the user exits out. A simple solution is to use sendkeys and send an F3 on activate on the create form0 -
why should this create blank records?
I have an Cancel button also in this form where the user should enter the data for this new record.
I just check if all Fields are empty, if so i delete the rec
Same code in the onclose form0 -
Hi tompynation,
It's fine if you control all the potential exits but users can unfilter the record, navigate to a different record and exit from that valid record. Or my particular favourate is that if you filter on the code (assume is the key) and hit next, then the form thinks its inserting a new record with the code. If you then exit and your code deletes blank then it deletes a valid record.0 -
mm i didnt thought about that one... #-o
Guess i will use the sendkey function then.
How does this work?0 -
Have a search on the forum there's lots of posts - basically it's code to allow you send key presses to the software as if the user has pressed the keys.
e.g.
http://www.mibuso.com/forum/viewtopic.p ... t=sendkeys
Have fun !0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions