NAV Storage/Recall of Last Used Journal Batch Names
buzzwick
Member Posts: 6
Hi,
Can anyone tell me if I am correct in understanding that NAV stores the last-selected Journal Batch Name (for, say, the Item Journal or the General Journal) in the PersonalizationStore file?
When I open the General Journal (p. 39) and step through in the Debugger, I see that OnInit is the first trigger to be run. At this point CurrentJnlBatchName--the batch selection field at the top of the page--is not defined. Then OnInit in p. 699, Dimension Set Entries Fact Box is run (how is this even called?), and when the code returns to the OnOpenPage trigger of p. 39, CurrentJnlBatchName is magically set to the batch selected when the form was last used. I am assuming that this is done by NAV behind the scenes, and that functionality is not available to the programmer (i.e., me).
We have some custom journal pages and would like them to function as nearly as possible the same as base NAV, but I fear that we would have to roll our own to duplicate what NAV is doing here. Am I right?
Thanks very much for your help,
<edit> Conversely, can anyone recommend a method for saving last-used journal batch name values, per username? Thanks.
Can anyone tell me if I am correct in understanding that NAV stores the last-selected Journal Batch Name (for, say, the Item Journal or the General Journal) in the PersonalizationStore file?
When I open the General Journal (p. 39) and step through in the Debugger, I see that OnInit is the first trigger to be run. At this point CurrentJnlBatchName--the batch selection field at the top of the page--is not defined. Then OnInit in p. 699, Dimension Set Entries Fact Box is run (how is this even called?), and when the code returns to the OnOpenPage trigger of p. 39, CurrentJnlBatchName is magically set to the batch selected when the form was last used. I am assuming that this is done by NAV behind the scenes, and that functionality is not available to the programmer (i.e., me).
We have some custom journal pages and would like them to function as nearly as possible the same as base NAV, but I fear that we would have to roll our own to duplicate what NAV is doing here. Am I right?
Thanks very much for your help,
<edit> Conversely, can anyone recommend a method for saving last-used journal batch name values, per username? Thanks.
0
Best Answer
-
In General Journal (page 39) you can see the property SaveValues = yes. It saves the last value of variable CurrentJnlBatchName in table "Page Data Personalization" for each user. This is done behind the scene, as far as you could not debug properties. And OnInit trigger will not show you any values, cause object and variables are not initialized yet.5
Answers
-
In General Journal (page 39) you can see the property SaveValues = yes. It saves the last value of variable CurrentJnlBatchName in table "Page Data Personalization" for each user. This is done behind the scene, as far as you could not debug properties. And OnInit trigger will not show you any values, cause object and variables are not initialized yet.5
-
Rebogh,
Thank you! Is there a way to make use of this NAV functionality for custom pages, or is it only for built-in objects?
Thanks again,
<another edit>From other forums, apparently the answer is NO. SaveValues stores page data as a BLOB in a system table. You can look, but you can't touch.0 -
Turns out:
NAV will not save the values of ordinary Global Variables, but if that variable is made a page control by listing it on the Page Designer pane (as is CurrentJnlBatchName), then the value of that variable is stored and available when the page is opened.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 324 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