web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to pass custom fields to approval entry table when you send approval request.

(0) ShareShare
ReportReport
Posted on by 99

I have create a custom table "Cost Sheet Header".set workflow for this table.

create tableextension for "approva entry" table add Customer Name,Machine No. . I want to show this fields on Request  To approve page so create page extension for 

"Requests to Approve".
when send requst to approve then customer name,machine no should be blank on request To approve page.
 
pastedimage1659678842844v1.png

  [EventSubscriber(ObjectType::Codeunit, Codeunit::"Approvals Mgmt.", 'OnPopulateApprovalEntryArgument', '', true, true)]
    local procedure SetPopulateApprovalEntryArgument(var RecRef: RecordRef; var ApprovalEntryArgument: Record "Approval Entry"; WorkflowStepInstance: Record "Workflow Step Instance")
    var

        RecMachineCostSheet: Record "ST_Cost Sheet Header";
        RecINRCostSheet: Record "ST_INR CostSheet Header";
        IsHandled: Boolean;
    begin

        case RecRef.Number of

            DATABASE::"ST_Cost Sheet Header":
                begin
                    RecRef.SetTable(RecMachineCostSheet);
                    ApprovalEntryArgument."Document No." := RecMachineCostSheet."Cost Sheet No.";
                    ApprovalEntryArgument."Customer Name" := RecMachineCostSheet."Customer Name";
                    ApprovalEntryArgument."Machine Category" := RecMachineCostSheet."Machine Category";
                    ApprovalEntryArgument."Machine Model No." := RecMachineCostSheet.Model;
                    ApprovalEntryArgument."Enquiry Quantity" := RecMachineCostSheet."Enquiry Quantity";
                    ApprovalEntryArgument.Amount := RecMachineCostSheet."Offer Net price(With Usance)";

                end;
        end;

    end;

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    I will open this up to the community in case they have something to add.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Please try to use OnAfterInsert trigger for that Request to approve Table. Check the table from the behind of this page. by using Ctrl+Alt+f1

    Thanks.

  • Shamsheer86 Profile Picture
    10 on at

    Hi Sejal,

    Did you found any solution on this as I also stuck on the same situation.

    Thanks

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi

    Please 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans