microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
792 stars 622 forks source link

[Event Request] Page 36 Assembly BOM - CheckMandatoryRecFields #27641

Open JosefKainzSHB opened 1 week ago

JosefKainzSHB commented 1 week ago

Describe the request

   local procedure CheckMandatoryRecFields()
    var
        IsHandled: Boolean;
    begin
        // -New Event
        IsHandled := false;
        OnBeforeCheckMandatoryRecFields(Rec, IsHandled);
        if IsHandled then
            exit;
        // +New Event

        Rec.TestField("Parent Item No.");
        case Rec.Type of
            Rec.Type::" ":
                Rec.TestField("Description");
            Rec.Type::Item, Rec.Type::Resource:
                begin
                    Rec.TestField("No.");
                    Rec.TestField("Quantity per");
                end;
        end;
    end;
    [IntegrationEvent(false, false)]
    local procedure OnBeforeCheckMandatoryRecFields(var BOMComponent: Record "BOM Component"; var IsHandled: Boolean)
    begin
    end;

Additional context

The function CheckMandatoryRecFieldsBeforePageInsert was refactored to the function CheckMandatoryRecFields and the new function is also invoked from the OnModify trigger. But for the new CheckMandatoryRecFields function the event is missing compared to function for the OnInsert trigger. Internal work item: AB#558159