How to use button to Insert Record and dont use press F3

mootoon
Member Posts: 47
I want to know how to use button to insert new record.
plz tell me how to.
plz tell me how to.
AAA
0
Comments
-
Normally we press F3 to Insert New Record.IF We dont use F3 and want to
create button to Insert New Record.How to do that ? Any body can do?AAA0 -
You can use windows scripting for this to simulate F3.
Just search this forum for examples.0 -
You can do this whith a temporay table in the form like the tracking entries.0
-
f.e. on a Customer form:
Customer.INSERT(TRUE); GET(Customer."No."); // position form to the empty record.
Do It Yourself is they key. Standard code might work - your code surely works.0 -
Shenpen wrote:f.e. on a Customer form:
Customer.INSERT(TRUE); GET(Customer."No."); // position form to the empty record.
CLEAR(rec); INSERT(TRUE); FIND('=');
And I think the FIND is not even necessary.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I usualy do things the "Mark Brummel" way to0
-
Waldo wrote:Didn't test it, but don't you have to do an INIT (clear all values) instead of a CLEAR(Rec)?Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
-
So then you'd nee to do
CLEAR(Rec); Rec.INIT;
So you have a new record and all init values are taken care of as well.0 -
OR
INIT; "No." := '';
This way the filters the user has set remain, just like using F3.0 -
Hello,
i tried the following on the Customer Card:
New Menu Button with one Menu Item "Test" and Shortcut F3.
New Command Button named "New" with this code in the OnPush Trigger:
Clear(rec);
init();
Insert(True);
I put the CommandButton over the Menu Button so the User cant see the Menu Button.
After running the Form nothing happend on hitting F3, because the Shortcut on the Menu Item overwrites the existing Shortcut F3.
I there is a No. Series for the Customer you will receive a new Record after clicking the "New" Button. Otherwise you have to fill in the PK -Fields directly in the OnPush Trigger.0 -
I don't understand why you would create a button that does the same thing as F3, give it the shortcut F3 and it would do the same.... Couldn't you just better leave the whole thing alone? That way, when you hit F3, it will act as though you hit F3, because you just hit F3 :shock: go figure...0
-
my guess is simply cause he doesn't want to allow inserts on form, or wants to disable fields etc.. lots of possible reasons
i once tried it, but wasnt able to make it work0 -
Hello,
its only an idea for solving mootoon's problem.
Normally we press F3 to Insert New Record. If We dont use F3 and want to
create button to Insert New Record.How to do that ? Any body can do?
I dont think that it is a good idea not to use the Navision functionality for this think, but maybe there are some special reasons
By the way,
the menu button dosnt do the same as F3!! It prevents the user for using "normal" F3! To Insert a new record you have to push the Command Button with your own code.
Regards,
Frank0 -
I was trying to be sarcastic in my last post :shock: sorry if that didn't come through. Of course people have reasons to do things, and to them they are perfectly valid. Just ask my wife, she'll tell you I am weird, when I think everything I do makes perfect sense0
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