Skip to content

[Event Request] codeunit 1201 "Process Data Exch." - OnBeforeNegateAmounts #29238

Description

@RZ440

Why do you need this change?

We need an event to add additional information before the values of TempFieldIdsToNegate are deleted.

Describe the request

Hello,
can you please add a new Event OnBeforeNegateAmounts in ProcessColumnMapping() on codeunit 1201 "Process Data Exch." ?

procedure ProcessColumnMapping(DataExch: Record "Data Exch."; DataExchLineDef: Record "Data Exch. Line Def"; RecRefTemplate: RecordRef)
.
.
.
                    OnProcessColumnMappingOnBeforeDataExchFieldFindSet(DataExch, DataExchFieldMapping, DataExchField, RecRef, TempFieldIdsToNegate, CurrLineNo, IsHandled);
                    if not IsHandled then
                        if DataExchField.FindSet() then
                            repeat
                                SetField(RecRef, DataExchFieldMapping, DataExchField, TempFieldIdsToNegate)
                            until DataExchField.Next() = 0
                        else
                            if not DataExchFieldMapping.Optional then
                                Error(
                                  MissingValueErr, DataExch."File Name", GetType(DataExch."Data Exch. Def Code"),
                                  DataExch."Data Exch. Def Code", CurrLineNo, DataExchFieldMapping."Column No.");
                until DataExchFieldMapping.Next() = 0;
                AXSOnBeforeNegateAmounts(RecRef, CurrLineNo, LastKeyFieldId, LineNoOffset, TempFieldIdsToNegate);

                NegateAmounts(RecRef, TempFieldIdsToNegate);

                IsHandled := false;
                OnProcessColumnMappingOnBeforeRecRefInsert(RecRef, DataExch, IsHandled);
                if not IsHandled then
                    RecRef.Insert();
            end;
        until DataExchFieldGroupByLineNo.Next() = 0;

        OnAfterProcessColumnMapping(DataExch);
    end;
[IntegrationEvent(false, false)]
local procedure AXSOnBeforeNegateAmounts(RecRef: RecordRef; CurrLineNo: Integer; LastKeyFieldId: Integer; LineNoOffset: Integer; var TempFieldIdsToNegate: Record "Integer" temporary)
begin
end;

Internal work item: AB#608828

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

IntegrationGitHub request for Integration areaevent-requestRequest for adding an event

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions