Options

Access to a folder and to see if files have been recorded

averiasaverias Member Posts: 22
Hello,

I need to develop one module that from Navision it can, every certain period of time (five minutes, for exmaple), to access to a folder and to see if files have been recorded in that folder. Does some function exist from Navision that makes it or would it have to made an OCX? If it is this way, it exists some OCX or some thing that it can made this.

Thank you for your time. A greeting.

Comments

  • Options
    PatPat Member Posts: 7
    You can put the code into the OnTimer-Trigger on a form. Set the property TimerInterval on this form (milliseconds). With the table File (Table 2000000022) you can search for a specific file on the computer. The only thing you have to be sure that this specific form has to be always open. Otherwise the code in the OnTimer-Trigger will not be executed.
  • Options
    averiasaverias Member Posts: 22
    Thank you, I had studied other ideas but this I find quite appropriate. The only inconvenience is to always have opened that form.

    Does some trigger OnTimer exist associated to the application? that is to say, something that once open the application executes the trigger OnTimer and by means of the property TimerInterval every so often can made the action.

    Thank you for their time
  • Options
    ArhontisArhontis Member Posts: 667
    Hello,

    There is no Application level OnTimer trigger, but you can auto open the form using the login procedures in the codeunit 1.

    But I guess you don't want all the users to check that folder or not? I all the users try to get the files from the same folder simultaneous, then you might get sharing violation...
  • Options
    pdjpdj Member Posts: 643
    Or you could create a codeunit and mark it singleinstance. In it you could use the timer component used i.e. in codeunit 5065 and listen to the events. A bit more tricky and a bit hard to debug, but when it works it is nice :-)
    Regards
    Peter
  • Options
    NaviTools.comNaviTools.com Member Posts: 88
    If every user should check for files, put code on menu form. This one stays open 99% of the time (not upgrade compatible with 4.0).
    http://www.NaviTools.com
    Documentation for Microsoft Navision
    E/R diagrams, Workflow diagrams, UML diagrams, process diagrams
  • Options
    averiasaverias Member Posts: 22
    Thanks to all for your answers. I will begin to make tests shortly. A greeting.
Sign In or Register to comment.