Report 296 Jobsceduler doesn't run

BlackBird
BlackBird Member Posts: 52
Hi Forum,

I'm trying to automate the process of posting salesorders. Therefore i want to run report 296 throught the jobsceduler.
This does'n't work however. Job sceduler management keeps saying: "The job scheduler stopped due to an error. The program has moved the job to the next run date and time.".
When activating the jobsceduler report 296 stops when executing the command "IF SalesPost.RUN("Sales Header") THEN BEGIN"
Does anyone have any idea why this doesn't work and how to fix/change it?

Best Regards,


Hans

Comments

  • BlackBird
    BlackBird Member Posts: 52
    This turns out te be a known Navision error. The resolution was published under KB-article 906876.

    Hans
  • KeesMeuzelaar
    KeesMeuzelaar Member Posts: 26
    Where do i find KB-article 906876.
  • KeesMeuzelaar
    KeesMeuzelaar Member Posts: 26
    I do not have rights to open this link, could anyone open it for me and copy the info into the forum.
  • themave
    themave Member Posts: 1,058
    I do not have rights to open this link, could anyone open it for me and copy the info into the forum.
    As an end user myself, I can tell you, that you won't have access to many knowledge base articles regarding Navision, it seems we are left to have to use our solution center to trouble shoot most of our problems
  • keian27
    keian27 Member Posts: 5
    This is from the article. You have to have a Solution Developer's license though:

    To install this hotfix, change the code in the JobScheduler-Run code unit (5961) as follows:
    Trigger OnRun(VAR Rec : Record "Job Scheduler Setup")
    Existing code

    LOCKTABLE;
    GET(ID);
    CASE "Object Type" OF
    "Object Type"::Report:
    REPORT.RUNMODAL("Object No.",FALSE,FALSE);

    "Object Type"::Dataport:
    DATAPORT.RUNMODAL("Object No.",FALSE);

    "Object Type"::Codeunit:
    CODEUNIT.RUN("Object No.");
    END;

    "Message Text" := Text002;
    MODIFY;

    Replacement code

    CASE "Object Type" OF
    "Object Type"::Report:
    REPORT.RUNMODAL("Object No.",FALSE,FALSE);

    "Object Type"::Dataport:
    DATAPORT.RUNMODAL("Object No.",FALSE);

    "Object Type"::Codeunit:
    CODEUNIT.RUN("Object No.");
    END;

    "Message Text" := Text002;
    MODIFY;

    Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.