...
OnOpenForm=VAR
JnlSelected@1000 : Boolean;
BEGIN
OpenedFromBatch := ("Journal Batch Name" <> '') AND ("Worksheet Template Name" = '');
IF OpenedFromBatch THEN BEGIN
CurrentJnlBatchName := "Journal Batch Name";
ReqJnlManagement.OpenJnl(CurrentJnlBatchName,Rec);
EXIT;
END;
ReqJnlManagement.TemplateSelection(FORM::"Req. Worksheet",FALSE,0,Rec,JnlSelected);
IF NOT JnlSelected THEN
ERROR('');
CurrentJnlBatchName := "Journal Batch Name";
ReqJnlManagement.OpenJnl(CurrentJnlBatchName,Rec);
END;
...
...
OnOpenForm=VAR
JnlSelected@1000 : Boolean;
BEGIN
OpenedFromBatch := ("Journal Batch Name" <> '') AND ("Worksheet Template Name" = '');
IF OpenedFromBatch THEN BEGIN
CurrentJnlBatchName := "Journal Batch Name";
ReqJnlManagement.OpenJnl(CurrentJnlBatchName,Rec);
EXIT;
END;
ReqJnlManagement.TemplateSelection(FORM::"Req. Worksheet",FALSE,0,Rec,JnlSelected);
IF NOT JnlSelected THEN
ERROR('');
ReqJnlManagement.OpenJnl(CurrentJnlBatchName,Rec);
END;
...