Open Dialog/Window from a Form???

beno.pulver
Member Posts: 31
Good evening,
Since hours im trying and searching because of a problem with opening a dialog/window.
From a subform I call an own form, where the users can do selections with checkboxes. If they press the OK button, I execute the selection.
As there are many records to process, I thought to display a progress bar/window.
But now I get always the error "XY cannot be closed. because it is already locked by Microsoft Dynamics NAV"!?! I do not close my own form. But it seems, that the "WindosG.OPEN..." tries to close my own form.
If I do the same thing with a report instead with a form, then the progress window/bar is displayed without any problems.
Is there a restriction, that you can display dialog windows only from codeunits and reports, but not from a form???
Do you have any idea how to solve the problem?
Of course I could simply use a report instead of a form. But I would like to know, why it is not working with my form.
Best regards and thank you for any support, Beno
Since hours im trying and searching because of a problem with opening a dialog/window.
From a subform I call an own form, where the users can do selections with checkboxes. If they press the OK button, I execute the selection.
As there are many records to process, I thought to display a progress bar/window.
But now I get always the error "XY cannot be closed. because it is already locked by Microsoft Dynamics NAV"!?! I do not close my own form. But it seems, that the "WindosG.OPEN..." tries to close my own form.
If I do the same thing with a report instead with a form, then the progress window/bar is displayed without any problems.
Is there a restriction, that you can display dialog windows only from codeunits and reports, but not from a form???
Do you have any idea how to solve the problem?
Of course I could simply use a report instead of a form. But I would like to know, why it is not working with my form.
Best regards and thank you for any support, Beno
0
Answers
-
I believe the code of the dialog is in the wrong trigger. It might even be on the wrong form.
So you call your ownform from a subform.
The user checks one or more checkboxes and presses an OK button. Is that the caption of the button or is it an OK button: pushaction = lookupok?
If it is the latter then pressing the ok will close the ownform. If you open your dialog when the user presses ok, the ownform can't close because the dialog locks it. I think you should fetch the checkboxvalues in you subform when the user closes the ownform and execute the business logic on the subform instead on the ownform.
(this is heavily based on assumptions based on your description, but I'm guessing I'm not far off)0 -
Hi Sog,
so stupid! You are completly right!!!
The OK-Button wants to close the form, so a display of another window/dialog is not possible.
After creating an own button without "PushAction = OK" everything works perfectly.
Thank you very much, Beno0
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