Skip to content

[Event Request] table 901 "Assembly Line" - OnCopyFromItemOnBeforeSetLocationCode #30284

Description

@auzhhv

Why do you need this change?

        GetItemResource();
        if IsInventoriableItem() then begin
            // >>>>>>>>>
            //"Location Code" := AssemblyHeader."Location Code";
            LocationCode := AssemblyHeader."Location Code";
            OnCopyFromItemOnBeforeSetLocationCode(Rec, LocationCode);
            "Location Code" := LocationCode ;
            // <<<<<<<<<<
            Item.TestField("Inventory Posting Group");
        end;
    [IntegrationEvent(false, false)]
    local procedure OnCopyFromItemOnBeforeSetLocationCode(var AssemblyLine: Record "Assembly Line"; var LocationCode: Code[10])
    begin
    end;

Describe the request

Is it possible to add an event to be able to override Location Code for Assembly Line in procedure CopyFromItem.
I know i can update it at the end of the procedure.
But then I have to validate it as location is used in GetDefaultBin.
The less code I have to trigger myself, the better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions