YIELD function in 2009

tedcjohnstontedcjohnston Posts: 49Member
edited 2009-11-02 in NAV Three Tier
I received a warning when compiling a custom codeunit in 2009- Function YIELD is obsolete. Evidently it does now work in the RTC. Not using the RTC yet, but would like to clean it up if possible. What is the suggested way to handle a long running process in 2009 so it does not hammer all users for the duration?
"There are only two truly infinite things: the universe and stupidity. And I am unsure about the universe." - Albert Einstein
Corollary- Build and idiot proof system and nature will build a better idiot.

Answers

  • SavatageSavatage Posts: 7,140Member
    I have the definition as:
    YIELD
    Use this function to pass control to the operating system, specifically DOS/Windows 3.x, so it can process events. Once the operating system finishes, you regain control.

    if you're running 2009 your os has great multitasking capabilities that nav shouldn't interfere with.
    Can you tell us how you're using it?
  • ara3nara3n Posts: 9,241Member
    add to your code.

    if not isservicetier then

    you shouldn't get the warning.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • David_SingletonDavid_Singleton Posts: 5,454Member
    I am with Harry on this. Any computer capable of running 2009 wont need yeild statements, so just remove it.

    The last time I used that would have been on a 486.
    David Singleton
Sign In or Register to comment.