How to hide batch job history for jobs with no log?

Is there a way to prevent my batch job from showing in the history if there was no log? I have a job running every 3 minutes and it uses a query object…if the query object returns no results, it still shows up in the history.

It is difficult to see the information I really want.

Have you tried to change the “Save batch job to history” field of the batch job?

Perhaps the value “Error only” will help you.

If not, I guess you can write some custom code inside the serverProcessFinishedJobs method of the BatchRun class.

That is where batch jobs are inserted into the history table.

/Jonas

This is good info. From this I was able to see that there really is no way to do it without adding a decent amount of custom code. For those curious, the log is stored in a container called “Info”. If I try to change the where clause that inserts the history records to only insert records that have a “log”, AX doesn’t let you put containers in where clauses, so I would have to have some sort of flag that gets flipped, etc.