Dear Experts,
I want to add a restriction in cash payment voucher payment page if user not inserted the narration he will not be able to take preview post.
please help..below code is written..but it is not working
GenJournalNarration.RESET;
GenJournalNarration.SETRANGE("Journal Template Name",'CASH PAYME');
GenJournalNarration.SETRANGE("Journal Batch Name",'KKOLA-CP-A');
GenJournalNarration.SETRANGE("Document No.",Rec."Document No.");
GenJournalNarration.SETFILTER("Line No.",'<>%1',0);
//GenJournalNarration.SETRANGE("Gen. Journal Line No.",Rec."Line No.");
//GenJournalNarration.SETRANGE("Line No.",Rec."Line No.");
IF GenJournalNarration.FINDFIRST THEN BEGIN
IF GenJournalNarration.Narration='' THEN BEGIN
GenJournalNarration.TESTFIELD(Narration);
END;
END;