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

Community site session details

Session Id :

Modify a Batch Job's Created by user after it is saved.

bnorma01 Profile Picture bnorma01 119

When an AX batch job runs the user that created the batch job is what gets stamped on all the data it updates and is also the user that is used for permissions.  Often jobs are created using a users logon when it should have been a system account that will exist for the life of the system.  Within our company these jobs are often created by IT staff members but for auditing purposes it does not look right when IT folks user accounts are stamped all over the data the jobs modify.  In place of removing these jobs and setting them up under the proper account it is very simple to modify the user account behind the scenes provided you have access to SQL.  A word of caution here is that our batch and batchJob tables are not cached thus direct SQL updates are fairly safe.  I also make these changes while the job is not running.  A test in a non-production system is also advised.  Further the AX database does not use SQL constraints which could verify your account existed so if the user account has a typo you will have unpredictable results.

First we determine the Batch Job's ID.  This can be done in one of two ways.  First way is to locate the batch job in AX then select "View tasks" and then the "General" tab.  The Batch job ID should be listed as a ten position number, in my case 5637401137.  The second way is from SQL selecting from the batchJob table based on the caption column with the RecId returned being the Batch Job ID and caption being the name of the job from the front end.  Below shows both methods.

BatchUpdateBlog_5F00_1_2800_NoServNames_2900_.gif

BatchUpdateBlog_5F00_2.gif

Secondly run the below two updates directly in SQL.

BatchUpdateBlog_5F00_3.gif

Back in AX refresh your Batch Job list and the created by user will be updated.  Now the next time the job runs the batch job history and all the records updated will show the new user account while previous runs will still be shown with the prior user account.

BatchUpdateBlog_5F00_4_2800_NoServerName_2900_.gif

Comments

*This post is locked for comments