Options

Block Jobs for Orders

enduser2019enduser2019 Member Posts: 3
edited 2021-12-22 in NAV Three Tier
Hello everyone,

we are using NAV 2016 ; Vers. 9.0.47042.0 and have following problem:

we would like to block a job (card 88 / table 167) in a way that any new order (Page 42 / Table 36) cannot be assigned to it. Blocking it didn't help.

In the end it should work the same way as a blocked customer. As soon as somebody is trying to put in the blocked job number into the job field on the order card a message occurs and it cannot be entered.

It should be temporarily so that it can be unblocked at any time when we see it fit.

Thank you in advance for your input.

Best Answer

  • Options
    txerifftxeriff Member Posts: 492
    Answer ✓
    Hi there,
    That's not nav standard, it doesn't have jobs there.

    Just create an event subscriber for job no field or change validate trigger and check if job.blocked

Answers

  • Options
    txerifftxeriff Member Posts: 492
    I havent used jobs for years but by standard you cant assign jobs in SO lines, can you?

    I had a look to "create job sales invoice" for jobs action (which at the end creates the invoice based on the jobs, not the order), if it's blocked by standard should stop:
    LOCAL CreateSalesInvoiceLines(JobNo : Code[20];VAR JobPlanningLine : Record "Job Planning Line";InvoiceNo : Code[20];NewInvoice : Boolean;PostingDate : Date;CreditMemo : Boolean)
    CLEARALL;
    Job.GET(JobNo);
    IF Job.Blocked = Job.Blocked::All THEN
      Job.TestBlocked;
    
    


    I suggest to check if you have any customisation etc.
  • Options
    enduser2019enduser2019 Member Posts: 3
    edited 2021-12-22
    I think my explanation wasn't accurate enough, here is a picture for better understanding:

    2g04v8pt5205.png

    Our SOs are usually assigned to jobs. In our case we want to prevent that any further SOs are assigned to this particular job. So as soon as somebody is trying to enter a new SO with respective job no. the same message as with blocked customer should appear and tell the sales person that that the current job is blocked (put on hold) and no SO can be assigned to it.

    I hope that it is a bit more clear now.
  • Options
    txerifftxeriff Member Posts: 492
    Answer ✓
    Hi there,
    That's not nav standard, it doesn't have jobs there.

    Just create an event subscriber for job no field or change validate trigger and check if job.blocked
  • Options
    enduser2019enduser2019 Member Posts: 3
    Alright, then thanks a lot for your input. Let's see what I kind do. :)
Sign In or Register to comment.