Run general Journal page with a specific template and batch

poppinspoppins Member Posts: 647
edited 2015-06-30 in NAV Three Tier
Hi everyone,

I want to run page 39 (General Journal) directly with a specific Journal template and batch names that are store in a setup table.
I wrote the following piece of code in a page action:
IF xxxSetup.GET() THEN;
GenJnlLine.RESET;
GenJnlLine.SETRANGE("Journal Template Name",xxxSetup."Journal Template Name");
GenJnlLine.SETRANGE("Journal Batch Name",xxxSetup."Journal Batch Name");
pgeGenJnl.SETTABLEVIEW(GenJnlLine);
pgeGenJnl.RUNMODAL;
but it doesn't work, I always get the list of templates when I try to run my action.
How can I correct it to get the result I want?

Thanks in advance :mrgreen:

Comments

  • remco_rauschremco_rausch Member Posts: 68
    I suggest you look at the code onOpenPage, this page doesn't work the same as most pages in NAV.

    You could add a function to Page 39 to bypass the code onOpenPage, you would call that function before you run the page, alternatively move your setup to the functions in GenJnlManagement but you have to be more careful with that.
Sign In or Register to comment.