Error message hijacking my message popup.

Peter_T
Member Posts: 1
I want to display a message to the user, letting them know why a page cannot be edited. But when I put in something like:
Note that this error only appears when I try to display a message, and when dismissed, the page displays as normal, except the message i wanted to show never appears.
Currently I have "solved" it like this:
Has anyone experienced something like this before?
OnAfterGetCurrRecord() IF (CurrPage.EDITABLE = FALSE) THEN MESSAGE('some message');Then i instead get an error message saying: "Server page is not open. Page <page name> must close." (<page name> being the previous page that runs the current page)
Note that this error only appears when I try to display a message, and when dismissed, the page displays as normal, except the message i wanted to show never appears.
Currently I have "solved" it like this:
OnAfterGetCurrRecord() IF (CurrPage.EDITABLE = FALSE) THEN BEGIN MESSAGE(''); MESSAGE('some message'); END;With the empty message sort of "catching" the error, meaning both the error and my message get displayed.
Has anyone experienced something like this before?
0
Answers
-
You shouldn't put messages in the OnAfterGetCurrRecord....
If a user wants to know why the current record is not editable, use an action that gives the message.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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