Open General Journal Page with Batch Paramater

jimmyf
Member Posts: 104
In Nav 2013 I would like to open Page 39, General Journal from a page action by passing the Batch Name as a paramater.
Does anyone have any experience doing this?
Does anyone have any experience doing this?
0
Comments
-
You can add a new function in Page 39 to set batch name to CurrentJnlBatchName and call that function before calling the page.0
-
Hi,
this should go without an extra function. In Page 39, trigger OnOpenPage is this standard code:BalAccName := ''; OpenedFromBatch := ("Journal Batch Name" <> '') AND ("Journal Template Name" = ''); IF OpenedFromBatch THEN BEGIN CurrentJnlBatchName := "Journal Batch Name"; GenJnlManagement.OpenJnl(CurrentJnlBatchName,Rec); EXIT; END; GenJnlManagement.TemplateSelection(PAGE::"General Journal",0,FALSE,Rec,JnlSelected); IF NOT JnlSelected THEN ERROR(''); GenJnlManagement.OpenJnl(CurrentJnlBatchName,Rec);
When you set the gen. jnl. batch name (and only this field) in the Gen. Jnl Line record before calling the page with it, then it should work. I would define the Gen. Jnl. Line as a local variable on the page action, though.
with best regards
Jens0 -
Dear All,
I want to open a custom page (similar to page id 39) thru a specific "Journal Template Name" & a "Journal Batch Name" too.
Please look the Code of OnOpen Page (Custom Page)...OnOpenPage() BalAccName := ''; IF IsOpenedFromBatch THEN BEGIN CurrentJnlBatchName := "Journal Batch Name"; GenJnlManagement.OpenJnl(CurrentJnlBatchName,Rec); SetControlAppearance; EXIT; END; GenJnlManagement.TemplateSelection(PAGE::"General Journal",0,FALSE,Rec,JnlSelected); IF NOT JnlSelected THEN ERROR(''); GenJnlManagement.OpenJnl(CurrentJnlBatchName,Rec); SetControlAppearance;
Due to above function called "IsOpenedFromBatch" in the SourceTable 81, I am not able to execute the same.
The Code of "IsOpenedFromBatch" is given below.IsOpenedFromBatch() : Boolean BatchFilter := GETFILTER("Journal Batch Name"); IF BatchFilter <> '' THEN BEGIN TemplateFilter := GETFILTER("Journal Template Name"); IF TemplateFilter <> '' THEN GenJournalBatch.SETFILTER("Journal Template Name",TemplateFilter); GenJournalBatch.SETFILTER(Name,BatchFilter); GenJournalBatch.FINDFIRST; END; EXIT((("Journal Batch Name" <> '') AND ("Journal Template Name" = '')) OR (BatchFilter <> ''));
I have tried to achieve my goal thru different ways but I can't get the positive result.
Please suggest the best solution for the same without hampering standard code/code blocking..
Thanks,
Navuser1Now or Never0
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