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;