ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 5767 "Warehouse Activity Line" New Publisher
Hi, we need a new Publisher in procedure ValidateQtyWhenSNDefined in table "Warehouse Activity Line". Current Code of 19.4 is the following:
procedure ValidateQtyWhenSNDefined()
begin
if Rec."Serial No." = '' then
exit;
if not (Rec."Qty. (Base)" in [-1, 0, 1]) then
Error(ValidValuesIfSNDefinedErr, Rec.FieldCaption("Qty. (Base)"), Rec."Qty. (Base)");
if not (Rec."Qty. to Handle (Base)" in [-1, 0, 1]) then
Error(ValidValuesIfSNDefinedErr, Rec.FieldCaption("Qty. to Handle (Base)"), Rec."Qty. to Handle (Base)");
end;
After adding the event the code should be as followed:
procedure ValidateQtyWhenSNDefined()
var
IsHandled: Boolean;
begin
OnBeforeValidateQtyWhenSNDefined(Rec, IsHandled);
if IsHandled then
exit;
if Rec."Serial No." = '' then
exit;
if not (Rec."Qty. (Base)" in [-1, 0, 1]) then
Error(ValidValuesIfSNDefinedErr, Rec.FieldCaption("Qty. (Base)"), Rec."Qty. (Base)");
if not (Rec."Qty. to Handle (Base)" in [-1, 0, 1]) then
Error(ValidValuesIfSNDefinedErr, Rec.FieldCaption("Qty. to Handle (Base)"), Rec."Qty. to Handle (Base)");
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeValidateQtyWhenSNDefined(Rec: Record "Warehouse Activity Line"; var IsHandled: Boolean)
begin
end;
Could you please add the OnBeforeValidateQtyWhenSNDefined publisher to the procedure? Thanks in advanced!
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.