Hi All,
Just to let everyone know there is a bug in NAV 2017 in function RemoveFailedJobs...
The function deletes job queue entries in error for the same object ID without considering if the parameter string is the same or not... or if the run interval is the same...
JobQueueEntry2.SETRANGE("Object Type to Run",JobQueueEntry."Object Type to Run");
JobQueueEntry2.SETRANGE("Object ID to Run",JobQueueEntry."Object ID to Run");
JobQueueEntry2.SETRANGE("Record ID to Process",JobQueueEntry."Record ID to Process");
JobQueueEntry2.SETRANGE(Status,JobQueueEntry2.Status::Error);
IF NOT JobQueueEntry2.ISEMPTY THEN
JobQueueEntry2.DELETEALL;
Quick fix is to also filter for the parameter string but you could still end up with deleted setup entries if you setup a job queue entry for the same task at different times...
I'm actually questioning if this code should just be commented entirely... I don't think it is good practice to delete user setup entries...
What's your opin
Just to let everyone know there is a bug in NAV 2017 in function RemoveFailedJobs...
The function deletes job queue entries in error for the same object ID without considering if the parameter string is the same or not... or if the run interval is the same...
JobQueueEntry2.SETRANGE("Object Type to Run",JobQueueEntry."Object Type to Run");
JobQueueEntry2.SETRANGE("Object ID to Run",JobQueueEntry."Object ID to Run");
JobQueueEntry2.SETRANGE("Record ID to Process",JobQueueEntry."Record ID to Process");
JobQueueEntry2.SETRANGE(Status,JobQueueEntry2.Status::Error);
IF NOT JobQueueEntry2.ISEMPTY THEN
JobQueueEntry2.DELETEALL;
Quick fix is to also filter for the parameter string but you could still end up with deleted setup entries if you setup a job queue entry for the same task at different times...
I'm actually questioning if this code should just be commented entirely... I don't think it is good practice to delete user setup entries...
What's your opin