Is it possible to start a Job Queue entry with another user? (NAV 2017)

Jan87Jan87 Member Posts: 26
We are quite new to NAV 2017. We are coming from 2009. The Job Queue is a cool feature, but one thing I don't understand.

We want to use the Job Queue to run Background-Jobs (formerly NAS-Jobs). We want them to be started with different technical Users with only the neccessary permissions.

The problem is that the user that runs the queue has to push the button "Ready" in the Job Queue Entry Page.

And this every time the queue stops or need to be restarted/rescheduled.

Is there any possibility to change it?

Sorry for my bad english :(

Best Answers

Answers

  • JuhlJuhl Member Posts: 724
    Use OnAfterModify event of table Job Queue Entry

    IF Rec."User ID" <> 'domain\user' THEN BEGIN
    Rec."User ID" := 'domain\user';
    Rec.MODIFY(FALSE);
    END;
    Follow me on my blog juhl.blog
  • robbonickrobbonick Member Posts: 40
    Juhl wrote: »
    Use OnAfterModify event of table Job Queue Entry

    IF Rec."User ID" <> 'domain\user' THEN BEGIN
    Rec."User ID" := 'domain\user';
    Rec.MODIFY(FALSE);
    END;

    This will modify the Job Queue Entry, but the Scheduled Task will be left with an incorrect User ID.
  • JuhlJuhl Member Posts: 724
    Yes, but the Task is created based on the Job.
    It works for me.
    Follow me on my blog juhl.blog
  • xStepaxStepa Member Posts: 106
    this must be done before the Job is scheduled with CreateTask, than it works ...
    Regards
    xStepa
Sign In or Register to comment.