web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Get current running job queue entry in AL

(0) ShareShare
ReportReport
Posted on by

Hi everyone, I need help.

I am scheduling a codeunit in the Job Queue Entry table in AL. Now I want to update a specific record in a table when the job runs.

How do I tell the running job that what record should be updated in this job? As job query entry runs automatically but how it gets to know that what record of the table should be updated? 

OR

How can I tell the scheduled codeunit that this record should be updated?

I hope you get my point. Please help me with this.

  • Suggested answer
    ArturV Profile Picture
    225 on at

    If you schedule the Job Queue Entry from the AL code then use the field 15 called "Record ID To Process".

  • Suggested answer
    Olister Rumao Profile Picture
    4,009 on at

    Hey Nishat,

    I hope you are trying to run something like a paramterized job right?

    If that is the case then you can simple create a table or a tableextension for a singleton such as General Ledger Setup where you will store the Table ID and Record ID.

    Then in the job you will need to get the data from the corresponding field and after your job is run successfully, you will update with the TableID and Record ID for the next run.

    If possible share your code so we can help you out.

  • Community Member Profile Picture
    on at

    Thanks for your valuable reply

    Yes, this is something like a parameterized job but can you please explain how can I achieve this?

    I have multiple records saved in a table and multiple job queue entries to run the same codeunit to update these records on their specified time.

    Now I need to know that what record should be updated in the currently running job queue entry.

    How do I match the Job queue entry id with record id to run a specific record?

  • Suggested answer
    Olister Rumao Profile Picture
    4,009 on at

    Hi Nishant,

    There are simply 2 things which should the part of the job.

    1. Job Fetching the correct parameters mechanism.

    2. Job settings the parameters for the next run.

    For first step either create a table or fields in the setup tables.

    When your job runs, automatically it will fetch the contents of the fields / tables.

    For the second step, after the job is successfully completed with its execution write the logic to update the data in the table/fields which will be set for the next run.

    This is the maximum I can suggest knowing your general question.

    If you want further help with the logic, you will need to provide with the details.

  • Verified answer
    Olister Rumao Profile Picture
    4,009 on at

    Hi Nishant,

    There are simply 2 things which should the part of the job.

    1. Job Fetching the correct parameters mechanism.

    2. Job settings the parameters for the next run.

    For first step either create a table or fields in the setup tables.

    When your job runs, automatically it will fetch the contents of the fields / tables.

    For the second step, after the job is successfully completed with its execution write the logic to update the data in the table/fields which will be set for the next run.

    This is the maximum I can suggest knowing your general question.

    If you want further help with the logic, you will need to provide with the details.

  • Community Member Profile Picture
    on at

    Thank you Olister Rumao,

    I have got your point and I will implement it today or tomorrow to get through your solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 677 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 430 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans