Error on NAS Scheduling

KishraguKishragu Member Posts: 45
Dear Experts,

Pardon my ignorance as I am not a NAV expert by any means.

I am trying to schedule a codeunit to run through NAS and the job is failing with the error message "Error on NAS Scheduling". However, if I run the codeunit manually via Object Designer it runs successfully without any errors. The instances where I have seen this error message before is if the codeunit is bringing up a dialog box / window whilst it is executing or on error or on successful completion.

In this instance when I am running it manually via object designer the codeunit is not bringing up any dialog box from start to end. So I am a bit baffled as to where / why the scheduled job is failing when executed via NAS. I have cross checked the scheduler settings with other similar jobs that are scheduled which are running successfully and they are exactly the same.

It will be great help if you could please point me in the right direction on where to start the investigation.

Btw, we are using NAV2009 SP1 Classic on native database.

Thanks in advance.

Cheers,
Kishore

Answers

  • ara3nara3n Member Posts: 9,256
    Are you running this on LS Scheduler or Job queue?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • KishraguKishragu Member Posts: 45
    Through LS Scheduler.
  • DenSterDenSter Member Posts: 8,307
    That error is not a standard NAV error, so it should be defined somewhere in some object. Run the codeunit with code coverage, then export all objects in text and open the file in notepad. Search for the string "Error on NAS Scheduling" and that should point you to where that is defined. If it is a text constant you can then research where it is used.

    If that doesn't work then you'll need to debug NAS and step through the code to see where it blows up.
  • ara3nara3n Member Posts: 9,256
    The LS Scheduler CU needs to be modified to use the new function GETLASTTEXTERROR. Find the place in code that calls
    if Codeunit.run( ) and change the return message to be the actual error.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • KishraguKishragu Member Posts: 45
    Found the issue it was to do with License!! All is well again!! \:D/
  • girish.joshigirish.joshi Member Posts: 407
    This error message comes from 99001469 NAS Scheduler Service in the function "ShouldRunNow"

    The system checks to see if the record's current "Run Status" is processing and if the .NASID field on the scheduler job header record equals the a NAS id variable. This variables value should be the first parameter in the string the NAS was started with. If you are using the LSR Scheduler, the value should be LSRSCHEDULER.
Sign In or Register to comment.