Options

NAV Storage/Recall of Last Used Journal Batch Names

buzzwickbuzzwick Member Posts: 6
edited 2018-02-06 in NAV Three Tier
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.

Best Answer

Answers

  • Options
    buzzwickbuzzwick Member Posts: 6
    edited 2018-02-07
    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.
  • Options
    buzzwickbuzzwick Member Posts: 6
    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.
Sign In or Register to comment.