Order Control

cwatrelot
Member Posts: 14
We want to display a confirm message to the user if the current order as not been printed (or other similar checking) like :
if [leave current order] and ("# printed" = 0) then
if not confirm('The order %1 had never been printed, continue ?') then
Don't move !
And to stay on the current order without confirmation.
This test must be done if the form is closed, or if another order is finded (with the 'previous' icon for example), but is not required if the user is only switching between header and lines.
We are trying every table and form triggers but can't find the fine way to achieved this goal.
Any idea ?
if [leave current order] and ("# printed" = 0) then
if not confirm('The order %1 had never been printed, continue ?') then
Don't move !
And to stay on the current order without confirmation.
This test must be done if the form is closed, or if another order is finded (with the 'previous' icon for example), but is not required if the user is only switching between header and lines.
We are trying every table and form triggers but can't find the fine way to achieved this goal.
Any idea ?
0
Comments
-
Try this:
First: Create an error in OnQueryCloseForm, if the required action is missing. This way the user is not able to close the form without an entry.
Second: In the Trigger OnAfterGetRecord you insert some code that checks if the xRec is o.K.. If it's not - you jump back to the xRec and tell the user what's missing.
in OnQueryCloseForm ...
IF "myCondition" = TRUE THEN
ERROR('...');
in OnAfterGetRecord ...
IF ("Nr." <> xRec."Nr.") AND (xRec."Nr." <> '') THEN BEGIN
IF ("myCondition" in xRec!) = TRUE THEN BEGIN
Rec := xRec;
xRec.TRANSFERFIELDS(Rec);
CurrForm.UPDATE(FALSE);
MESSAGE('Please ...');
END;
END;
Greetings, Richard0
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