Hi All,
I've created a import codeunit that will import Sales Order from external source, it is running by Job Queue, but user has option to run it manually in case they need to.
My question is how to check if the import codeunit is running? (I want to exit the import if other user/job queue is already running).
Thanks
vh8000
0
Answers
Guiallowed check can also be used.
https://forum.mibuso.com/discussion/69824/code-gurus-only-single-page-instance#latest
xStepa
As you are probably accessing files anyway, I recommend you create a flag file. Alternatively you can set a "Flag" in the database. You should commit that change, before you start importing.
Either way, if the importing session terminates for some reason, the flag might get stuck. You need to decide if it is ok for this condition to be detected and corrected by human workers, or if you need to implement an additional watchdog.