Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

How to flow custom fields in approval entry

Posted on by 10

I have created 2 fields in approval entry table and shows these fields in Request to approve screen.

Fields:

1. Customer/Vendor Name

2. Project Details

and Used the eventscriber to flow fields but they are not flowing

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Approvals Mgmt.", 'OnPopulateApprovalEntryArgument', '', false, false)]

    local procedure PopulateApprovalEntryFields(var ApprovalEntryArgument: Record "Approval Entry"; var RecRef: RecordRef; WorkflowStepInstance: Record "Workflow Step Instance")
    var
        Tab1: Record Variations;
    begin
        case RecRef.Number of
            Database::Variations:
                begin
                    RecRef.SetTable(tab1);
                    ApprovalEntryArgument."Document No." := tab1."Variation No.";
                   ApprovalEntryArgument."Customer/Vendor Name" := tab1."Customer Name";
                   ApprovalEntryArgument."Project Details" := tab1."Project No." + tab1."Project Description";
                end;
end;
  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: How to flow custom fields in approval entry

    You can try this event

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Approvals Mgmt.", 'OnBeforeApprovalEntryInsert', '', true, true)]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans