Why do you need this change?
Currently, there is no event available before the SetStatus procedure processes the incoming status value. The requested event will allow extension-based customizations to validate, modify, or handle status changes before standard Business Central logic executes, eliminating the need for Base Application modifications and ensuring upgrade-safe customizations.
Describe the request
Current Code
procedure SetStatus(NewStatus: Option)
begin
if NewStatus = Status then
exit;
RefreshLocked();
ClearServiceValues();
SetStatusValue(NewStatus);
end;
Requested Change
procedure SetStatus(NewStatus: Option)
begin
OnBeforeSetStatus(Rec, NewStatus);
if NewStatus = Status then
exit;
RefreshLocked();
ClearServiceValues();
SetStatusValue(NewStatus);
end;
Requested Event Publisher
[IntegrationEvent(false, false)]
local procedure OnBeforeSetStatus(var JobQueueEntry: Record "Job Queue Entry"; var NewStatus: Option)
begin
end;
Internal work item: AB#640904
Why do you need this change?
Currently, there is no event available before the SetStatus procedure processes the incoming status value. The requested event will allow extension-based customizations to validate, modify, or handle status changes before standard Business Central logic executes, eliminating the need for Base Application modifications and ensuring upgrade-safe customizations.
Describe the request
Current Code
procedure SetStatus(NewStatus: Option)
begin
if NewStatus = Status then
exit;
RefreshLocked();
ClearServiceValues();
SetStatusValue(NewStatus);
end;
Requested Change
procedure SetStatus(NewStatus: Option)
begin
OnBeforeSetStatus(Rec, NewStatus);
if NewStatus = Status then
exit;
RefreshLocked();
ClearServiceValues();
SetStatusValue(NewStatus);
end;
Requested Event Publisher
[IntegrationEvent(false, false)]
local procedure OnBeforeSetStatus(var JobQueueEntry: Record "Job Queue Entry"; var NewStatus: Option)
begin
end;
Internal work item: AB#640904