Share via


Table "Job Queue Entry"

ID 472
Namespace: System.Threading

Properties

Name Value
Caption Job Queue Entry
DataCaptionFields 7,8,9
DrillDownPageID Page System.Threading."Job Queue Entries"
LookupPageID Page System.Threading."Job Queue Entries"
Permissions TableData "Job Queue Entry" = rimd, TableData "Job Queue Log Entry" = rimd, TableData "Job Queue Category" = rm
ReplicateData False
DataClassification CustomerContent

Fields

Name Type Description
ID Guid
"User ID" Text[65]
XML Blob
"Last Ready State" DateTime
"Expiration Date/Time" DateTime
"Earliest Start Date/Time" DateTime
"Object Type to Run" Option
"Object ID to Run" Integer
"Object Caption to Run" Text[250]
"Report Output Type" Enum System.Threading."Job Queue Report Output Type"
"Maximum No. of Attempts to Run" Integer
"No. of Attempts to Run" Integer
Status Option
"Record ID to Process" RecordId
"Parameter String" Text[250]
"Recurring Job" Boolean
"No. of Minutes between Runs" Integer
"Run on Mondays" Boolean
"Run on Tuesdays" Boolean
"Run on Wednesdays" Boolean
"Run on Thursdays" Boolean
"Run on Fridays" Boolean
"Run on Saturdays" Boolean
"Run on Sundays" Boolean
"Starting Time" Time
"Ending Time" Time
"Reference Starting Time" DateTime
"Next Run Date Formula" DateFormula
Description Text[250]
"Run in User Session" Boolean
"User Session ID" Integer
"Job Queue Category Code" Code[10]
"Error Message" Text[2048]
"User Service Instance ID" Integer
"User Session Started" DateTime
"Notify On Success" Boolean
"User Language ID" Integer
"Printer Name" Text[250]
"Report Request Page Options" Boolean
"Rerun Delay (sec.)" Integer
"System Task ID" Guid
Scheduled Boolean
"Manual Recurrence" Boolean
"Inactivity Timeout Period" Integer
"Error Message Register Id" Guid
"Job Timeout" Duration
"Entry No." BigInteger
"Priority Within Category" Enum System.Threading."Job Queue Priority"

Specifies the priority of the job within the category. Is only used when the job has a Category Code

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemRowVersion BigInteger

Methods

DoesExistLocked

procedure DoesExistLocked(): Boolean

Returns

Type Description
Boolean

RefreshLocked

procedure RefreshLocked()

GetRecLockedExtendedTimeout

Allow up to three lock time-outs = 90 seconds, in order to reduce lock timeouts

procedure GetRecLockedExtendedTimeout(): Boolean

Returns

Type Description
Boolean

IsExpired

procedure IsExpired(AtDateTime: DateTime): Boolean

Parameters

Name Type Description
AtDateTime DateTime

Returns

Type Description
Boolean

IsReadyToStart

procedure IsReadyToStart(): Boolean

Returns

Type Description
Boolean

ShowErrorMessage

procedure ShowErrorMessage()

SetError

procedure SetError(ErrorText: Text)

Parameters

Name Type Description
ErrorText Text

SetResult

procedure SetResult(IsSuccess: Boolean, PrevStatus: Option, ErrorMessageRegisterId: Guid)

Parameters

Name Type Description
IsSuccess Boolean
PrevStatus Option
ErrorMessageRegisterId Guid

SetResultDeletedEntry

procedure SetResultDeletedEntry()

FinalizeRun

procedure FinalizeRun()

GetLastLogEntryNo

procedure GetLastLogEntryNo(): Integer

Returns

Type Description
Integer

InsertLogEntry

procedure InsertLogEntry(var JobQueueLogEntry: Record "Job Queue Log Entry")

Parameters

Name Type Description
JobQueueLogEntry Table System.Threading."Job Queue Log Entry"

FinalizeLogEntry

procedure FinalizeLogEntry(JobQueueLogEntry: Record "Job Queue Log Entry")

Parameters

Name Type Description
JobQueueLogEntry Table System.Threading."Job Queue Log Entry"

FinalizeLogEntry

procedure FinalizeLogEntry(JobQueueLogEntry: Record "Job Queue Log Entry", LastErrorCallStack: Text)

Parameters

Name Type Description
JobQueueLogEntry Table System.Threading."Job Queue Log Entry"
LastErrorCallStack Text

SetStatus

procedure SetStatus(NewStatus: Option)

Parameters

Name Type Description
NewStatus Option

Cancel

procedure Cancel()

DeleteTask

procedure DeleteTask()

DeleteTasks

procedure DeleteTasks()

Restart

procedure Restart()

CheckRequiredPermissions

procedure CheckRequiredPermissions()

HasRequiredPermissions

procedure HasRequiredPermissions(): Boolean

Returns

Type Description
Boolean

CancelTask

procedure CancelTask()

ScheduleTask

procedure ScheduleTask(): Guid

Returns

Type Description
Guid

DefaultJobTimeout

procedure DefaultJobTimeout(): Duration

Returns

Type Description
Duration

ReuseExistingJobFromID

procedure ReuseExistingJobFromID(JobID: Guid, ExecutionDateTime: DateTime): Boolean

Parameters

Name Type Description
JobID Guid
ExecutionDateTime DateTime

Returns

Type Description
Boolean

ReuseExistingJobFromCategory

procedure ReuseExistingJobFromCategory(JobQueueCategoryCode: Code[10], ExecutionDateTime: DateTime): Boolean

Parameters

Name Type Description
JobQueueCategoryCode Code[10]
ExecutionDateTime DateTime

Returns

Type Description
Boolean

ReuseExistingJobFromCategoryAndUser

procedure ReuseExistingJobFromCategoryAndUser(JobQueueCategoryCode: Code[10], UserId: Text, ExecutionDateTime: DateTime): Boolean

Parameters

Name Type Description
JobQueueCategoryCode Code[10]
UserId Text
ExecutionDateTime DateTime

Returns

Type Description
Boolean

CleanupAfterExecution

procedure CleanupAfterExecution()

IsNextRunDateFormulaSet

procedure IsNextRunDateFormulaSet(): Boolean

Returns

Type Description
Boolean

ShowStatusMsg

procedure ShowStatusMsg(JQID: Guid)

Parameters

Name Type Description
JQID Guid

LookupRecordToProcess

procedure LookupRecordToProcess()

LookupObjectID

procedure LookupObjectID(var NewObjectID: Integer): Boolean

Parameters

Name Type Description
NewObjectID Integer

Returns

Type Description
Boolean

GetXmlContent

procedure GetXmlContent(): Text

Returns

Type Description
Text

SetXmlContent

procedure SetXmlContent(Params: Text)

Parameters

Name Type Description
Params Text

GetReportParameters

procedure GetReportParameters(): Text

Returns

Type Description
Text

SetReportParameters

procedure SetReportParameters(Params: Text)

Parameters

Name Type Description
Params Text

RunReportRequestPage

procedure RunReportRequestPage()

ScheduleJobQueueEntry

procedure ScheduleJobQueueEntry(CodeunitID: Integer, RecordIDToProcess: RecordId)

Parameters

Name Type Description
CodeunitID Integer
RecordIDToProcess RecordId

ScheduleJobQueueEntryWithParameters

procedure ScheduleJobQueueEntryWithParameters(CodeunitID: Integer, RecordIDToProcess: RecordId, JobParameter: Text[250])

Parameters

Name Type Description
CodeunitID Integer
RecordIDToProcess RecordId
JobParameter Text[250]

ScheduleJobQueueEntryForLater

procedure ScheduleJobQueueEntryForLater(CodeunitID: Integer, StartDateTime: DateTime, JobQueueCategoryCode: Code[10], JobParameter: Text)

Parameters

Name Type Description
CodeunitID Integer
StartDateTime DateTime
JobQueueCategoryCode Code[10]
JobParameter Text

GetStartingDateTime

procedure GetStartingDateTime(Date: DateTime): DateTime

Parameters

Name Type Description
Date DateTime

Returns

Type Description
DateTime

GetEndingDateTime

procedure GetEndingDateTime(Date: DateTime): DateTime

Parameters

Name Type Description
Date DateTime

Returns

Type Description
DateTime

ScheduleRecurrentJobQueueEntry

procedure ScheduleRecurrentJobQueueEntry(ObjType: Option, ObjID: Integer, RecId: RecordId)

Parameters

Name Type Description
ObjType Option
ObjID Integer
RecId RecordId

ScheduleRecurrentJobQueueEntryWithFrequency

procedure ScheduleRecurrentJobQueueEntryWithFrequency(ObjType: Option, ObjID: Integer, RecId: RecordId, NoofMinutesbetweenRuns: Integer)

Parameters

Name Type Description
ObjType Option
ObjID Integer
RecId RecordId
NoofMinutesbetweenRuns Integer

ScheduleRecurrentJobQueueEntryWithFrequency

procedure ScheduleRecurrentJobQueueEntryWithFrequency(ObjType: Option, ObjID: Integer, RecId: RecordId, NoofMinutesbetweenRuns: Integer, StartTime: Time)

Parameters

Name Type Description
ObjType Option
ObjID Integer
RecId RecordId
NoofMinutesbetweenRuns Integer
StartTime Time

ScheduleRecurrentJobQueueEntryWithRunDateFormula

procedure ScheduleRecurrentJobQueueEntryWithRunDateFormula(ObjType: Option, ObjID: Integer, RecId: RecordId, JobQueueCategoryCode: Code[10], MaxAttemptsToRun: Integer, NextRunDateFormula: DateFormula, StartingTime: Time)

Parameters

Name Type Description
ObjType Option
ObjID Integer
RecId RecordId
JobQueueCategoryCode Code[10]
MaxAttemptsToRun Integer
NextRunDateFormula DateFormula
StartingTime Time

InitRecurringJob

procedure InitRecurringJob(NoofMinutesbetweenRuns: Integer)

Parameters

Name Type Description
NoofMinutesbetweenRuns Integer

FindJobQueueEntry

procedure FindJobQueueEntry(ObjType: Option, ObjID: Integer): Boolean

Parameters

Name Type Description
ObjType Option
ObjID Integer

Returns

Type Description
Boolean

GetDefaultDescription

procedure GetDefaultDescription(): Text[250]

Returns

Type Description
Text[250]

FilterInactiveOnHoldEntries

procedure FilterInactiveOnHoldEntries()

DoesJobNeedToBeRun

procedure DoesJobNeedToBeRun(): Boolean

Returns

Type Description
Boolean

Events

OnAfterReschedule

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

Parameters

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

OnAfterCleanupAfterExecution

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

Parameters

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

OnAfterGetXmlContent

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

Parameters

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

OnAfterRunReportRequestPage

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

Parameters

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

OnAfterSetDefaultValues

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

Parameters

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

OnBeforeClearServiceValues

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

Parameters

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

OnAfterFinalizeRun

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

Parameters

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

OnBeforeInsertLogEntry

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

Parameters

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

OnBeforeModifyLogEntry

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

Parameters

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

OnBeforeScheduleTask

[IntegrationEvent(False,False)]
local procedure OnBeforeScheduleTask(var JobQueueEntry: Record "Job Queue Entry", var TaskGUID: Guid, var IsHandled: Boolean)

Parameters

Name Type Description
JobQueueEntry Table System.Threading."Job Queue Entry"
TaskGUID Guid
IsHandled Boolean

OnBeforeSetRecurringField

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

Parameters

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

OnBeforeSetStatusValue

[IntegrationEvent(False,False)]
local procedure OnBeforeSetStatusValue(var JobQueueEntry: Record "Job Queue Entry", var xJobQueueEntry: Record "Job Queue Entry", var NewStatus: Option, var IsHandled: Boolean)

Parameters

Name Type Description
JobQueueEntry Table System.Threading."Job Queue Entry"
xJobQueueEntry Table System.Threading."Job Queue Entry"
NewStatus Option
IsHandled Boolean

OnBeforeTryRunJobQueueSendNotification

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

Parameters

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

OnFindingIfJobNeedsToBeRun

[IntegrationEvent(True,False)]
local procedure OnFindingIfJobNeedsToBeRun(var Result: Boolean)

Parameters

Name Type Description
Result Boolean

OnInsertOnBeforeSetDefaultValues

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

Parameters

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

OnRunReportRequestPageBeforeGetReportParameters

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

Parameters

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

OnScheduleTaskOnAfterCalcShouldChangeUserID

Obsolete

This element will become obsolete from version 25.0. Function ScheduleTask no longer changes user ID.

[Obsolete(Function ScheduleTask no longer changes user ID.,25.0)]
[IntegrationEvent(False,False)]
local procedure OnScheduleTaskOnAfterCalcShouldChangeUserID(var JobQueueEntry: Record "Job Queue Entry", var ShouldChangeUserID: Boolean)

Parameters

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

OnSetXmlContentOnBeforeModify

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

Parameters

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

OnBeforeCleanupAfterExecution

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

Parameters

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

OnBeforeRestart

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

Parameters

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

OnAfterSetReportParameters

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

Parameters

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

OnScheduleRecurrentJobQueueEntryOnBeforeEnqueueTask

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

Parameters

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

OnModifyOnAfterRunParametersChangedCalculated

[IntegrationEvent(False,False)]
local procedure OnModifyOnAfterRunParametersChangedCalculated(var JobQueueEntry: Record "Job Queue Entry", var xJobQueueEntry: Record "Job Queue Entry", var RunParametersChanged: Boolean)

Parameters

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

OnBeforeHandleExecutionError

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

Parameters

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

OnBeforeIsReadyToStart

[IntegrationEvent(False,False)]
local procedure OnBeforeIsReadyToStart(var JobQueueEntry: Record "Job Queue Entry", var ReadyToStart: Boolean, var IsHandled: Boolean)

Parameters

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

OnAfterSetStatusValue

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

Parameters

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

See also