Job Scheduler => Extra parameters

RensRens Member Posts: 8
Hello,

Does someone know how, or if it is possible, to run the job scheduler with extra parameters?
We want to run a job and we want to specify a date from which the data will be taken.

Example:
We have customers, and we want to make the bills for the period of June the first till July the first.

But we don't know how to get those parameters from the job scheduler into the job itself.

So my question:
How to create a job with extra parameters which will be send to the scheduler.

Thanks,
Rens

Comments

  • cnicolacnicola Member Posts: 181
    Hi Rens,

    It depends on what drives the logic of the extra parameters.
    If they params are static you can concatenate them in the parameter you send to NAS. And in the NAS function in codeunit 1 you just separate them out again.
    If it is dynamic then you will have to keep track of them in the db and just update them whenever the NAS routine is being run.

    P.S. I guess I am trying to say that it is not possible directly :D
    Apathy is on the rise but nobody seems to care.
  • ara3nara3n Member Posts: 9,256
    Take a look at 5.0 job queue. It has a parameter that is passed to the code unit.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • themavethemave Member Posts: 1,058
    edited 2007-10-26
    I do this with a few reports, I added a few fields to the setup table. in your case I would use the Sales & Receivables Setup

    make them date fields. and then you just have to update those for the period you want.

    then your report that you run in the job scheduler, modify it to use the dates found in the customer setup table.

    I run the reports at night, so setting the paramaters before I leave is not a problem
  • themavethemave Member Posts: 1,058
    If you were going to do this with a lot of different parameters, it might be better just to create a whole new table that did nothing but hold parameters you needed for different reports.

    then you could create forms for your customer reports that had the parameters for those, and a different form for vendor reports. or inventory reports, ect. this way you wouldn't be modifying a lot of tables.
Sign In or Register to comment.