Skip to content

[Event Request] table 5851 "Invt. Document Line" - OnAfterCreateDim #29330

@pri-kise

Description

@pri-kise

Why do you need this change?

We need to restore some previous manually assigned custom dimensions after the new creation of the dimensions from the default dimensions.

Describe the request

Could you please add the event OnAfterCreateDim similiar to the event in the line tables (e.g. sales line, transfer line)?

procedure CreateDim(DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])
var
    SourceCodeSetup: Record "Source Code Setup";
begin
    SourceCodeSetup.Get();
    "Shortcut Dimension 1 Code" := '';
    "Shortcut Dimension 2 Code" := '';
    GetInvtDocHeader();
    "Dimension Set ID" :=
        DimMgt.GetDefaultDimID(
        DefaultDimSource, "Source Code", "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code",
        InvtDocHeader."Dimension Set ID", DATABASE::"Invt. Document Header");
    DimMgt.UpdateGlobalDimFromDimSetID("Dimension Set ID", "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code");
    //>EVENT
    OnAfterCreateDim(Rec, CurrFieldNo, xRec, DefaultDimSource);
    //<EVENT
end;
[IntegrationEvent(false, false)]
local procedure OnAfterCreateDim(var InvtDocumentLine: Record "Invt. Document Line"; CurrentFieldNo: Integer; xInvtDocumentLine: Record "Invt. Document Line"; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]);
begin
end;

Internal work item: AB#610750

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions