Sales - Post (Yes /No)

dimitris
Member Posts: 17
Hallo,
I have a couple of small problems.
When a user posts an invoice (Shift + F11), a dialog window appears asking for Yes / No , and the default value is "No" . How I can I change this value to yes (to make a dummy's user life less complicated
) ?
The second question is : I have added a command button. How can I associate this button with a F key (e.g F11) without having to create a menu item?
Thanks in advance!
I have a couple of small problems.
When a user posts an invoice (Shift + F11), a dialog window appears asking for Yes / No , and the default value is "No" . How I can I change this value to yes (to make a dummy's user life less complicated

The second question is : I have added a command button. How can I associate this button with a F key (e.g F11) without having to create a menu item?
Thanks in advance!
0
Comments
-
Question 1:
Find the following code in the "Post yes/no" codeunitIF NOT CONFIRM( Text001,FALSE, "Document Type") THEN EXIT;
Change FALSE to TRUE and you should be all set.
Question 2:
You can't. You can only associate a function key to a selection on a menu button. You could put a very small menu button on your form and hide it behind another control though, and program it to do the same thing as your command button.0 -
Thanks A lot. Nice workaround!0
-
-
And what if the code is like this (on item available check Codeunit 311):
(function)SalesLineCheck(SalesLine : Record "Sales Line")
IF CheckItemAvail.SalesLineShowWarning(SalesLine) THEN BEGIN
OK := CheckItemAvail.RUNMODAL = ACTION::Yes;
CLEAR(CheckItemAvail);
IF NOT OK THEN
ERROR(Text000);
END;
How can I then send a default yes to the Checkitemavail report?0 -
Hello vanrofi,
The default "No" in the Check Availability form is set in its OnOpenForm trigger. So if you want to default the highligthing of the "Yes" button just add a name for the "Yes" button and change the code to:CurrForm.YesButtonName.ACTIVATE;
Regards//Bogdan0
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