ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 336 "Tracking Specification", Field 5811 "Appl.-from Item Entry": OnValidateApplFromItemEntryOnBeforeFieldErrorSourceType
Hello, we need to include new tables into item tracking, thanks in advance.
field(5811; "Appl.-from Item Entry"; Integer)
{
Caption = 'Appl.-from Item Entry';
MinValue = 0;
trigger OnValidate()
var
ItemLedgEntry: Record "Item Ledger Entry";
begin
if "Appl.-from Item Entry" = 0 then
exit;
case "Source Type" of
DATABASE::"Sales Line":
if (("Source Subtype" in [3, 5]) and ("Quantity (Base)" < 0)) or
(("Source Subtype" in [1, 2]) and ("Quantity (Base)" > 0)) // sale
then
FieldError("Quantity (Base)");
DATABASE::"Item Journal Line":
if (("Source Subtype" in [0, 2, 6]) and ("Quantity (Base)" < 0)) or
(("Source Subtype" in [1, 3, 4, 5]) and ("Quantity (Base)" > 0))
then
FieldError("Quantity (Base)");
DATABASE::"Service Line":
if (("Source Subtype" in [3]) and ("Quantity (Base)" < 0)) or
(("Source Subtype" in [1, 2]) and ("Quantity (Base)" > 0))
then
FieldError("Quantity (Base)");
DATABASE::"Invt. Document Line":
if (("Source Subtype" in [1, 3, 4, 5]) and ("Quantity (Base)" < 0)) or
(("Source Subtype" in [0, 2, 6]) and ("Quantity (Base)" > 0))
then
FieldError("Quantity (Base)");
// - changed
// else
// FieldError("Source Subtype");
else begin
IsHandeld := false;
OnValidateApplFromItemEntryOnBeforeFieldErrorSourceType(Rec, IsHandeld);
if not IsHandeld then
FieldError("Source Subtype");
end;
// + changed
end;
[IntegrationEvent(false, false)]
local procedure OnValidateApplFromItemEntryOnBeforeFieldErrorSourceType(var TrackingSpecification: Record "Tracking Specification"; var IsHandeld: Boolean)
begin
end;
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.