Hello Everyone,
We have a Job Queue Entry which runs and exports a CSV file, if it fails the job queue entry errors but the file it has created stays in the specified folder location, obviously this is bad as next time it runs it picks up some of the entries placed in the previous file, files are sent to the external vendor and obviously they are not happy to receive these duplicates.
I want to know if it is possible to delete the file if the job queue errors at all?
Note - the job queue was not designed by myself and is not using an XML port to export the data. :roll:
0
Comments
Without coding? No.
You may want to adjust the process to delete/archive any existing files at the beginning of the routine (clear out left over files) or change the structure of the routine to verify the process ran (i.e. if Codeunit.run) and delete any existing files if not.
I'd stay away from modifying the JobQueue processing as it would be something specific to the job and not the platform.
You might also consider using Dotnet to handle your file creation and IO.