Hi,
I have used SetRange in the Cash Receipt Journal for the Journal Template Name. I need to know how to set a dynamic SetRange for the Journal Template Name. Below is the code I have used
Note: GenJournalBatch.SetRange("Journal Template Name", 'CASHRECEPT');
'CASHRECEPT' _ I need this name to have a dynamic value
For Exapmle;
trigger OnLookup(var Text: Text): Boolean
var
GenJournalBatch: Record "Gen. Journal Batch";
begin
GenJournalBatch.Reset();
GenJournalBatch.SetRange("Journal Template Name", 'CASHRECEPT');
if PAGE.RunModal(Page::"General Journal Batches", GenJournalBatch) = ACTION::LookupOK then begin
Rec."Batch ID" := GenJournalBatch.Name;
end;
end;
Thank You ,