Announcements
No record found.
actions { area(Processing) { action(Test1) { ApplicationArea = All; Caption = 'Test1'; Image = Print; trigger OnAction() begin RunGenJournalWithLayout('2-000001'); end; } action(Test2) { ApplicationArea = All; Caption = 'Test2'; Image = Print; trigger OnAction() begin RunGenJournalWithLayout('2-000002'); end; } action(Test3) { ApplicationArea = All; Caption = 'Test3'; Image = Print; trigger OnAction() begin RunGenJournalWithLayout('2-000003'); end; } action(Test4) { ApplicationArea = All; Caption = 'Test4'; Image = Print; trigger OnAction() begin RunGenJournalWithLayout('2-000004'); end; } action(Test5) { ApplicationArea = All; Caption = 'Test5'; Image = Print; trigger OnAction() begin RunGenJournalWithLayout('2-000005'); end; } action(Test6) { ApplicationArea = All; Caption = 'Test6'; Image = Print; trigger OnAction() begin RunGenJournalWithLayout('2-000006'); end; } } } local procedure RunGenJournalWithLayout(LayoutId: Text[30]) var Genline: Record "Gen. Journal Line"; DesigntimeReportSelection: Codeunit "Design-time Report Selection"; begin // prepare dataset (same as you had) Genline.Reset(); Genline.SetRange("Journal Template Name", Rec."Journal Template Name"); Genline.SetRange("Journal Batch Name", Rec."Journal Batch Name"); // choose design-time layout DesigntimeReportSelection.SetSelectedLayout(LayoutId); // run the report (modal, preview/print as before) Report.Run(Report::"General Journal - Test", true, true, Genline); end;
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 1,926 Super User 2026 Season 1
YUN ZHU 1,158 Super User 2026 Season 1
Khushbu Rajvi. 533 Super User 2026 Season 1