Please add the following Event/-s OnAfterSetStatusValue to Procedure SetStatusValue in TAB472 Job Queue Entry.
[Event Request] TAB472 Job Queue Entry - Procedure SetStatusValue
local procedure SetStatusValue(NewStatus: Option)
var
JobQueueDispatcher: Codeunit "Job Queue Dispatcher";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSetStatusValue(Rec, xRec, NewStatus, IsHandled);
if IsHandled then
exit;
if NewStatus = Status then
exit;
case NewStatus of
Status::Ready:
begin
SetDefaultValues(false);
"Earliest Start Date/Time" := JobQueueDispatcher.CalcInitialRunTime(Rec, CurrentDateTime);
EnqueueTask();
end;
Status::"On Hold":
CancelTask();
Status::"On Hold with Inactivity Timeout":
if "Inactivity Timeout Period" > 0 then begin
SetDefaultValues(false);
"Earliest Start Date/Time" := JobQueueDispatcher.CalcNextRunTimeHoldDuetoInactivityJob(Rec, CurrentDateTime);
EnqueueTask();
end;
end;
Status := NewStatus;
Modify();
// NEW
OnAfterSetStatusValue(Rec, xRec)
// NEW
end;
[IntegrationEvent(false, false)]
local procedure OnAfterSetStatusValue(var JobQueueEntry: Record "Job Queue Entry"; var xJobQueueEntry: Record "Job Queue Entry")
begin
end;
Describe the request
Please add the following Event/-s OnAfterSetStatusValue to Procedure SetStatusValue in TAB472 Job Queue Entry.
Additional context
Save a notification Internal work item: AB#542994