Codeunit "Job Queue Management"

ID 456
Namespace: System.Threading

Methods

CreateJobQueueEntry

procedure CreateJobQueueEntry(var JobQueueEntry: Record "Job Queue Entry")

Parameters

Name Type Description
JobQueueEntry Table System.Threading."Job Queue Entry"

DeleteJobQueueEntries

procedure DeleteJobQueueEntries(ObjectTypeToDelete: Option, ObjectIdToDelete: Integer)

Parameters

Name Type Description
ObjectTypeToDelete Option
ObjectIdToDelete Integer

StartInactiveJobQueueEntries

procedure StartInactiveJobQueueEntries(ObjectTypeToStart: Option, ObjectIdToStart: Integer)

Parameters

Name Type Description
ObjectTypeToStart Option
ObjectIdToStart Integer

SetJobQueueEntriesOnHold

procedure SetJobQueueEntriesOnHold(ObjectTypeToSetOnHold: Option, ObjectIdToSetOnHold: Integer)

Parameters

Name Type Description
ObjectTypeToSetOnHold Option
ObjectIdToSetOnHold Integer

SetRecurringJobsOnHold

procedure SetRecurringJobsOnHold(CompanyName: Text)

Parameters

Name Type Description
CompanyName Text

SetStatusToOnHoldIfInstanceInactiveFor

procedure SetStatusToOnHoldIfInstanceInactiveFor(PeriodType: Option, NoOfPeriods: Integer, ObjectTypeToSetOnHold: Option, ObjectIdToSetOnHold: Integer): Boolean

Parameters

Name Type Description
PeriodType Option
NoOfPeriods Integer
ObjectTypeToSetOnHold Option
ObjectIdToSetOnHold Integer

Returns

Type Description
Boolean

RunJobQueueEntryOnce

procedure RunJobQueueEntryOnce(var SelectedJobQueueEntry: Record "Job Queue Entry")

Parameters

Name Type Description
SelectedJobQueueEntry Table System.Threading."Job Queue Entry"

CheckAndRefreshCategoryRecoveryTasks

procedure CheckAndRefreshCategoryRecoveryTasks()

FindStaleJobsAndSetError

To find stale jobs (in process jobs with no scheduled tasks) and set them to error state. For both JQE and JQLE

procedure FindStaleJobsAndSetError()

Events

OnGetCheckDelayInMinutes

Used for test. Sets the minimum age of stale job queue entries and job queue log entries.

[IntegrationEvent(False,False)]
local procedure OnGetCheckDelayInMinutes(var DelayInMinutes: Integer)

Parameters

Name Type Description
DelayInMinutes Integer

OnRunJobQueueEntryOnceOnAfterJobQueueEntryInsert

[IntegrationEvent(False,False)]
local procedure OnRunJobQueueEntryOnceOnAfterJobQueueEntryInsert(SelectedJobQueueEntry: Record "Job Queue Entry", JobQueueEntry: Record "Job Queue Entry")

Parameters

Name Type Description
SelectedJobQueueEntry Table System.Threading."Job Queue Entry"
JobQueueEntry Table System.Threading."Job Queue Entry"

OnFindStaleJobsAndSetErrorOnAfterSetError

[IntegrationEvent(False,False)]
local procedure OnFindStaleJobsAndSetErrorOnAfterSetError(var JobQueueEntry: Record "Job Queue Entry")

Parameters

Name Type Description
JobQueueEntry Table System.Threading."Job Queue Entry"

See also