Options

Query for on timer trigger

amitamit Member Posts: 7
edited 2003-10-22 in Navision Attain
Dear
IF we have to execute certain event after some interval of time in an application then please tell me at which object we should have to write code at on Timer trigger.

WR
Amit
India
Amit ( MCA)
Navision Technical Consultant
India

Comments

  • Options
    eromeineromein Member Posts: 589
    I think I understand your question.

    I think you could try the Main Menu form. This form is (almost) always open.

    But better is to install a NAS (navision appliation server) and execute the code using this "tool".
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • Options
    SbhatSbhat Member Posts: 301
    Hi,

    I would not recommend you to use the OnTimer Trigger because it eats up a lot of system resources and causes your system to be dead slow. I would recommend to create a form and have two button like Start service and Stop service, when start service is started run the required code in ONTimer and when done stop the service, its a efficient way of doing.

    Thanks
    Best regards
    Suresh
    NY.
  • Options
    eromeineromein Member Posts: 589
    Although I fully agree with Sbhat there are ways to use the ontimer trigger and not slow down your system.

    1.) Set the ontimerinterval to a high value.
    2.) Only run code in the ontimer if it's absolutely necessary.
    3.) Be very, very, very sure your code is optimal conserning performance.

    So see a sample of of correct working ontimer trigger take a look at the multiple subform sample in the download section of mibuso.

    http://www.mibuso.com/dlinfo.asp?FileID=290
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • Options
    amitamit Member Posts: 7
    Thanx for ur valuable comments on my query ,

    well what Mr sbhat has said is somehow correct in some cases
    but i don't think that this method will be fruitfull in my case .as for eg. if cleint wants a functionality that at perticular time let say 12:00PM some entries should be updated or post ...
    then in this case we would not supposed that user will start the services and stop after completion of service. as if he/she forget to start the services then ??????

    So we should have to do something which should be done automatically without the intervention of any user

    if u have any more suggestion please write to me ..

    Thanx
    WR
    Amit ( MCA)
    Navision Technical Consultant
    India
Sign In or Register to comment.