I create a customized workflow for the job with below reference link
when I click the button "approve to job" it does not show the job entries in a "notification Entries" table.
Kindly help me how to solve that issue
/** this is the codeUnit Code **/
Documentation() OnRun() RunWorkflowOnSendJobTMforApprovalCode() : Code[128] EXIT(UPPERCASE('RunWorkflowOnSendJobTMforApproval')); [EventSubscriber] RunWorkflowOnSendJobTMforApproval(VAR Job : Record Job) WorkFlowManagement.HandleEvent(RunWorkflowOnSendJobTMforApprovalCode,Job); Job."Approval Status":=Job."Approval Status"::"Pending Approval"; Job.MODIFY(TRUE); [EventSubscriber] RunWorkflowOnApproveApprovalRequestforJobTM(VAR ApprovalEntry : Record "Approval Entry") JobTable.RESET; JobTable.SETRANGE("No.",ApprovalEntry."Document No."); IF JobTable.FINDFIRST THEN BEGIN JobTable."Approval Status":=JobTable."Approval Status"::Released; JobTable.MODIFY(TRUE); END; WorkFlowManagement.HandleEventOnKnownWorkflowInstance(RunWorkflowOnApproveApprovalRequestforJobTMCode,ApprovalEntry,ApprovalEntry."Workflow Step Instance ID"); LOCAL RunWorkflowOnApproveApprovalRequestforJobTMCode() : Code[128] EXIT(UPPERCASE('RunWorkflowOnApprovalRequestforJobTM')); LOCAL [EventSubscriber] AddWorkflowEventsToLibrary() WorkflowEventHandling.AddEventToLibrary(RunWorkflowOnSendJobTMforApprovalCode,DATABASE::Job,'Send Job for Approval -Test',0,FALSE); WorkflowEventHandling.AddEventToLibrary(RunWorkflowOnApproveApprovalRequestforJobTMCode,DATABASE::"Approval Entry",'Approve Approval Request for job -Test',0,FALSE); WorkflowEventHandling.AddEventToLibrary(RunWorkflowOnRejectApprovalRequestforJobTMCode,DATABASE::"Approval Entry",'Reject Approval Request for job -Test',0,FALSE); WorkflowEventHandling.AddEventToLibrary(RunWorkflowOnDelegateApprovalRequestForJobTMCode,DATABASE::"Approval Entry",'Delegate Approval Request for job -Test',0,FALSE); LOCAL [EventSubscriber] AddWorkflowTableRelationToLibrary() WorkflowSetup.InsertTableRelation(DATABASE::Job,0,DATABASE::"Approval Entry",22); [EventSubscriber] RunWorkflowOnRejectApprovalRequestforJobTM(VAR ApprovalEntry : Record "Approval Entry") WorkFlowManagement.HandleEventOnKnownWorkflowInstance(RunWorkflowOnRejectApprovalRequestforJobTMCode,ApprovalEntry,ApprovalEntry."Workflow Step Instance ID"); JobTable.RESET; JobTable.SETRANGE("No.",ApprovalEntry."Document No."); IF JobTable.FINDFIRST THEN BEGIN JobTable."Approval Status":= JobTable."Approval Status"::Rejected; JobTable.MODIFY(TRUE); END; RunWorkflowOnRejectApprovalRequestforJobTMCode() : Code[128] EXIT(UPPERCASE('RunWorkflowOnRejectApprovalRequestforJobTMCode')); [EventSubscriber] RunWorkflowOnDelegateApprovalRequestForJobTM(VAR ApprovalEntry : Record "Approval Entry") WorkFlowManagement.HandleEventOnKnownWorkflowInstance(RunWorkflowOnDelegateApprovalRequestForJobTMCode,ApprovalEntry,ApprovalEntry."Workflow Step Instance ID"); JobTable.RESET; JobTable.SETRANGE("No.",ApprovalEntry."Document No."); IF JobTable.FINDFIRST THEN BEGIN JobTable."Approval Status":=JobTable."Approval Status"::Delegated; JobTable.MODIFY(TRUE); END;
/** Approval button code **/
Send approval Test - OnAction() IF WFEnable.CheckJobTMApprovalsWorkflowEnable(Rec) THEN WFEnable.OnSendJobTMforApproval(Rec);
*This post is locked for comments