Share via


About Job Queues

Job queues in Microsoft Dynamics NAV enable you to specify, request, and control when certain processes are run, such as the processing of a report or executing a codeunit. You enter your requests for the execution of a report or a codeunit in the Job Queue Entries window.

When the report or codeunit finishes, Microsoft Dynamics NAV records the event in the Job Queue Log Entries window. For example, you can use job queues with email logging so that it requests regular entries in this table. Microsoft Dynamics NAV also inserts a record into the Job Queue Log Entry table to record that it has processed a job queue entry.

For more information, see How to: Set Up Email Logging for use with the Job Queue.

Security

Job queue entries run based on permissions. Those permissions must allow the execution of the report or codeunit.

Security and Job Queues

When a job queue is activated manually, it is run with the credentials of the user. When a job queue is activated from the NAS, it is run with the credentials of the server instance.

Security and Job Queue Entries

When a job is run, it is run with the credentials of the job queue that activates it. However, the user who created that job queue entry must also have permissions. When a job is “Run in user Session” (for example, in Background Posting), it is run with the credentials of the user who created that job.

Important

If you use the SUPER permissions set that comes with the demo license for the CRONUS International Ltd. demonstration database, you and your users have permissions to run all objects. In this case, access for each user is only limited by permissions for data. The job queue will use the NAS to run the objects.

Using Job Queues Effectively

The job queue entry record has many fields whose purpose is to carry parameters into a codeunit that you have specified to be run with a job queue. This also means that codeunits that are to be run via the job queue must be specified with the Job Queue Entry record as a parameter in the OnRun trigger. This helps provide an extra level of security, as this prevents users from running random codeunits via the Job Queue. If the user must pass parameters to a report, the only way to do this is by wrapping the report execution into a codeunit, which then parses the input parameters and enters them into the report before executing it.

See Also

Tasks

How to: Set Up Job Queues

Other Resources

Configuring NAS Services