Checking record values in a timer loop

nismo2006nismo2006 Member Posts: 22
Hey,

I am trying to communicate between two processes to determine when one should run and the other should wait. I have a new table that indicates if one of the processes is running (by a boolean value). The other process should wait until a boolean field in this table is false. I have a timer that will continually poll the table and check to see if the value is false. It is not picking up on the value though. It continually thinks that it is true and never allows for it to run. I have tried to put the check into a function and a codeunit but no luck. It is almost like it is grabbing the record and holding the value. I have also tried to make another variable that is that table and it still does not do it. Has anyone come across this situation and I appreciate the help in advance.

Thanks

Comments

  • ara3nara3n Member Posts: 9,256
    how does your code look like that does the checking?
    Are you clearing the variable record before using it?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    You can try to use SELECTLATESTVERSION before you get the record from the DB.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • nismo2006nismo2006 Member Posts: 22
    I will try both of these methods, I appreciate the help. I was just a little confused that it seems like even though I call a new variable instance of the table, it keeps its values. It is almost like it has kept its cached values and can't be reset. I will post my results and thanks again.
  • nismo2006nismo2006 Member Posts: 22
    Kine,

    It worked brilliantly!!! :lol: Thank you so much for your help and hope you have a good day.
  • kinekine Member Posts: 12,562
    You are welcome! 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.