SendKeys using Job Queue

bstnalmbstnalm Member Posts: 25
I understand that we cannot run a form/dataport/message box/confirmation message from a Job Queue. May I know whether this rule applies to the SendKeys command as well?

Thanks.

Answers

  • kinekine Member Posts: 12,562
    Because the Job Queue is in most running under Application server, what you want to do with the sendkeys? ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • bstnalmbstnalm Member Posts: 25
    I was trying to implement Garak's NAV auto-backup form into a codeunit and tried to run it using a Job Queue. The logic being used inside is by utilising the SendKeys command. However, I am not able to get it work from the Job Queue(no error, but no FBK generated - I don't think it processes the codeunit completely). However, It works when I run the codeunit manually.

    I am not sure whether it is because Job Queue will not respond to SendKeys command.
  • kinekine Member Posts: 12,562
    Depends on if you are running the job queue on regular client. If yes, it should work, but of course, depends on language and which form/report/window you have open and focused when the SendKey is triggered. I recommend to use some commerce tools for that, or to upgrade to SQL server and you do not need to solve this... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • bstnalmbstnalm Member Posts: 25
    May I know what does 'regular client' means?

    I have thought about some commerce tools(e.g.: ExpandIT), however I prefer to explore on what NAV can actually provide rather than paying for something else easily :)
  • kinekine Member Posts: 12,562
    Regular client - common client with the GUI. As I wrote, Job Queue is commonly running under NAS (client without GUI) running as a service, thus interaction like SendKeys will not work on it. I hope, that you are not using the NAS, but the "regular client"... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • bstnalmbstnalm Member Posts: 25
    Ah, I see... :(
    Regular client - common client with the GUI. As I wrote, Job Queue is commonly running under NAS (client without GUI) running as a service, thus interaction like SendKeys will not work on it.

    I am in fact using NAS since the NAV version is 2009SP1. That explains everything now.

    Thanks Kamil! :)
  • bstnalmbstnalm Member Posts: 25
    I managed to make the auto-backup works by merging in the 'vintage' job scheduler functions from version 4(with a tiny modification done). The scheduler works and the backup file can be generated accordingly.

    Sadly, it doesn't work if someone locks the windows or in other words, it cannot work in the background.
Sign In or Register to comment.