Wrong focus on a Page

Troubles_In_Paradise
Member Posts: 588
Hi guys! I open this topic to ask you if someone has already faced, and maybe solved, this strange thingh.
Let's start:
1. Create a page ("Custom Page") type (Card or Document) for my example I based it on the table 36.
2. In a Group "General" place some fields
3. Create an action (could do everythingh you want) and set it to promoted
Now I've to launch this page from another page with an action via code (I know that in this simple example I could you use the RunObject property but in my project I can't because I have to launch functions contained in the page before launch it), so I put this code under the OnAction() trigger
So simple I think: InsertAllowed: No. This works but know there's a bad thingh the first promoted action is highlighted because focus point to it (see attachment).
I discovered that this is due to the InsertAllowed set to No and happens only when page is run via code, in fact if run it via Windows Run or from the Object Designer or from the RunObject property of an Action all works.
I tried also simplifying the code but it happens also in this case:
Many Thx and sorry for the long post!
Edit: version used is Nav2009R2 W1 build 32275
Let's start:
1. Create a page ("Custom Page") type (Card or Document) for my example I based it on the table 36.
2. In a Group "General" place some fields
3. Create an action (could do everythingh you want) and set it to promoted
Now I've to launch this page from another page with an action via code (I know that in this simple example I could you use the RunObject property but in my project I can't because I have to launch functions contained in the page before launch it), so I put this code under the OnAction() trigger
CLEAR(TestFocusPage); ... (here I set filters and call functions) TestFocusPage.RUNMODAL;all works as expected... but now I have to avoid that user insert a new record from the Custom Page.
So simple I think: InsertAllowed: No. This works but know there's a bad thingh the first promoted action is highlighted because focus point to it (see attachment).
I discovered that this is due to the InsertAllowed set to No and happens only when page is run via code, in fact if run it via Windows Run or from the Object Designer or from the RunObject property of an Action all works.
I tried also simplifying the code but it happens also in this case:
CLEAR(TestFocusPage); TestFocusPage.RUNMODAL;Has anyone got an idea?
Many Thx and sorry for the long post!
Edit: version used is Nav2009R2 W1 build 32275
~Rik~
It works as expected... More or Less...
It works as expected... More or Less...
0
Answers
-
Good Morning guys.
After many attempts I found that the only way to avoid this is to set the page type Worksheet and set the InsertAllowed to Yes.
In this way the focus point the first textbox in the page and the user didn't insert record in the Sales Order.
Thx!~Rik~
It works as expected... More or Less...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