ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 11401 CBG Statement Line - OnBeforeGenerateDocumentNo
We handle the setting of the Document No. in case of CBGStatement.Type::"Bank/Giro" in a different way, so we need an event to be able to skip procedure GenerateDocumentNo in that case. making use of the IsHandled-pattern.
procedure GenerateDocumentNo()
var
JournalTemplate: Record "Gen. Journal Template";
NoSeriesMgt: Codeunit NoSeriesManagement;
**IsHandled: Boolean; // <<New local var>>**
begin
**// <<Start new code
IsHandled := false;
OnBeforeGenerateDocumentNo(Rec, IsHandled);
if IsHandled then
exit;
// >>End new code**
TestField("Journal Template Name");
JournalTemplate.Get("Journal Template Name");
NoSeriesMgt.InitSeries(JournalTemplate."No. Series", xRec."No. Series", Date, "Document No.", "No. Series");
end;
Thanks in advance!
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 44168.