Dialog Window Closes Too Fast

lloydsmods
Member Posts: 93
I have written a dataport that imports transaction records into a table and then launches a function within that table to process the records (validate addresses, create orders, etc.). These files can get pretty huge so running this process can look to the users like nothing is happening for a few minutes or that the system has locked up. So I added a dialog window to display the processing status and update the status as it works. At the end it tells the user how many records were processed and of those, how many orders were created. That way the user can see if there are any discrepancies. The problem is that the window closes as soon as its finished. I don't have a CLOSE command, and yet it shuts down anyway.
The window is opened and updated in the function in the table, not in the codeunit, but this doesn't seem to matter, because the same thing happens if I create a dialog in the dataport (which I don't want to do).
Navsision creates a progress meter when you run a dataport, so could Navision be closing my dialog at the same time it closes the progress meter?
The window is opened and updated in the function in the table, not in the codeunit, but this doesn't seem to matter, because the same thing happens if I create a dialog in the dataport (which I don't want to do).
Navsision creates a progress meter when you run a dataport, so could Navision be closing my dialog at the same time it closes the progress meter?
If guns cause crime mine must be defective.
0
Comments
-
You can either add
a MESSAGE statement at the end, showing the records processed,
or a CONFIRM will enable breaks in between at any point, but will keep tables locked until YES or NO is pressed. This can be avoided by adding a COMMIT before the CONFIRM.
or close the first dialog window and open a second one, adding a SLEEP statement to keep it open,e.g. SLEEP(5000) keeps it open for 5 seconds.Kai Kowalewski0 -
I have done that on some of my dataports too.
Put the following Code in the OnPost Dataport Trigger
BEGIN
CurrFile.CLOSE;
IF CONFIRM(Text0001,TRUE,OrderCount) THEN
ERASE(CurrDataport.FILENAME);
END;
Where Text0001 = '%1 Orders Imported / Would You Like To Delete The File?'
->You could put anything but I wanted the file to be deleted once imported. You can use the suggestion above and have a Confim "Click yes to close the dialog box"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