Page in Foreground?
Troubles_In_Paradise
Member Posts: 588
Hi guys!
I've a question for you. To help creation of new customers I created a wizard that creates correctly the customer.
While closing the wizard it launches the customer card page.
The problem is that the card remains behind the RTC.
So I'm wondering if exist a way to specify to open the page in foreground.
Could anyone help me?
Thx in advance guys!
I've a question for you. To help creation of new customers I created a wizard that creates correctly the customer.
While closing the wizard it launches the customer card page.
The problem is that the card remains behind the RTC.
So I'm wondering if exist a way to specify to open the page in foreground.
Could anyone help me?
Thx in advance guys!
~Rik~
It works as expected... More or Less...
It works as expected... More or Less...
0
Answers
-
I don't think there is in NAV any property to control that, but you could send shortcut keys using windows host scrip automation for ALT+TAB0
-
Ok Ara3n, thx for reply!ara3n wrote:I don't think there is in NAV any property to control that, but you could send shortcut keys using windows host scrip automation for ALT+TAB~Rik~
It works as expected... More or Less...0 -
Hi guys, the following could be a solution:
1. Define a function in the wizard that indicates if user have clicked finish. Its boolean return value will be used in the page from which wizard had been launched (CreatedCustomer).
2. Define a function that gives back the id of customer just created (GetCustomerID)
3. insert following code in the page that launch wizard, after the wizard callIF PageWizard.CreatedCustomer THEN BEGIN RecordCustomer.RESET; RecordCustomer.GET(PageWizard.GetCustomerID); PAGE.RUN(PAGE::"Customer Card",RecordCustomer); END;
wizard is closed when card will be opened and it will be showed in Foreground.
Thx to Ara3n and to my colleague Belias that helps me to solve this problem.~Rik~
It works as expected... More or Less...0 -
I have a similar problem (only in RTC). I would like to open a page at the end of the OnValidate-Trigger of the Sell-To-Customer-No.-Field of the Sales Header-table.
If no(!) message appears before my page opens, my page appears very shortly and is sent to the background. If a message appears (e.g. "Do you want to change the Sell-To-Customer-No. ?") before my page opens, it stays in the foreground.
It does not help if I call the function which opens the page in the OnValidate-Trigger of the Sell-To-Customer-No.-Field on the Sales Header-page.0 -
could you post function's code used to launch this page?InfoWissler wrote:I have a similar problem (only in RTC). I would like to open a page at the end of the OnValidate-Trigger of the Sell-To-Customer-No.-Field of the Sales Header-table.
If no(!) message appears before my page opens, my page appears very shortly and is sent to the background. If a message appears (e.g. "Do you want to change the Sell-To-Customer-No. ?") before my page opens, it stays in the foreground.
It does not help if I call the function which opens the page in the OnValidate-Trigger of the Sell-To-Customer-No.-Field on the Sales Header-page.~Rik~
It works as expected... More or Less...0 -
Of course, sorry:
Bemerkung.SETRANGE("Table Name",Bemerkung."Table Name" :: Customer); Bemerkung.SETRANGE("No.","Sell-to Customer No."); IF Bemerkung.FIND('-') THEN FORM.RUN(FORM::"Comment Sheet",Bemerkung);0 -
InfoWissler wrote:Of course, sorry:
Bemerkung.SETRANGE("Table Name",Bemerkung."Table Name" :: Customer); Bemerkung.SETRANGE("No.","Sell-to Customer No."); IF Bemerkung.FIND('-') THEN FORM.RUN(FORM::"Comment Sheet",Bemerkung);
have you already tried to use the runmodal function instead of run?~Rik~
It works as expected... More or Less...0 -
Yes, but it is not possible to use the RUNMODAL function within write transactions.0
-
it's very strange thingh because I made a test now.
I created a new simple page:
type: card
sourcetable: customer
field: No., Name and Name2
I put this code in OnValidate of Name2 fieldFORM.RUN(FORM::"Customer Card",Rec);
but it opens page in foreground...
:-k~Rik~
It works as expected... More or Less...0 -
Thank you for your effort

To reproduce the problem, I think it is important that the Form.RUN is at the end of the Sell-To-Customer-Field of the Sales Header-table, because there are major differences between a Customer-Field/almost-empty page and the Sell-To-Customer-field/Sales Order page.0 -
Does anyone have an idea to solve this?0
-
Have you already tried the following?
(where CommentSheet is a Page variable that has as subtype "Comment Sheet")Bemerkung.SETRANGE("Table Name",Bemerkung."Table Name" :: Customer); Bemerkung.SETRANGE("No.","Sell-to Customer No."); IF Bemerkung.FIND('-') THEN Clear(CommentSheet); CommentSheet.run(Bemerkung);~Rik~
It works as expected... More or Less...0 -
Troubles In Paradise wrote:
CommentSheet.run(Bemerkung);
It is not possible to pass arguments while using the RUN function of a form variable.0 -
InfoWissler wrote:Troubles In Paradise wrote:
CommentSheet.run(Bemerkung);
It is not possible to pass arguments while using the RUN function of a form variable.
you're right I'm sorry..
and with this?MyPage.SETTABLEVIEW(MyRecord); MyPage.SETRECORD(MyRecord); MyPage.RUN;
~Rik~
It works as expected... More or Less...0 -
Nope, still same problem :-k0
-
I tried to create your scenario...
I put form.run in the trigger onvalidate of the field "Sell-to customer no." in sales order, but the page is opened in foreground... it's very very strange behaviour...~Rik~
It works as expected... More or Less...0 -
Same here... I posted the exact same code you did (opening the comment page at the end of the Sell-to Customer No. OnValidate trigger) and it opened in the foreground.
Are you using 2009 R2? That is what I did my testing in.0 -
Me too. :thumbsup:MattKeyes wrote:Are you using 2009 R2? That is what I did my testing in.~Rik~
It works as expected... More or Less...0 -
I tested the code on R2 and 2009 SP1.
Are you sure that you do not have any messages (like "do you really want to change the customer no.?" or "Check Credit Limit") while validating the customer no.? Because only if no message appears while validating the customer no., the page is opened in background, otherwise it works fine.0 -
InfoWissler wrote:I tested the code on R2 and 2009 SP1.
Are you sure that you do not have any messages (like "do you really want to change the customer no.?" or "Check Credit Limit") while validating the customer no.? Because only if no message appears while validating the customer no., the page is opened in background, otherwise it works fine.
Yes! I've no messages. Only one question... the page that remains in foregroud is launched with .Run or .Runmodal?~Rik~
It works as expected... More or Less...0 -
No messages here either.
One suggestion perhaps is to try this in a CRONUS database (as I did) and then post a link to the fob file to check it out.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
