Job Jnl.-Post Batch - Problem

KarelKarel Member Posts: 12
For a customer I have to make an extra Job Ledger Entry when posting a certain line trough the Job Journal.

So I've set this up in CU203:
// -- Here I post the regular Job Ledger Entry
JobJnlPostLine.RunWithCheck(vRecJobJnlLine,vTmpJnlLineDim);

// -- Here I post the extra Job Ledger Entry
JobJnlPostLine2.RunWithCheck(lRecJobJnlLinePurchCharge,lTmpJnlLineDimPurchCharge);

Now everything works fine, I do get the correct entries in the Job Ledger Entry table BUT in the Job Journal the lines don't get deleted and I get the message "There is nothing to post".

I have searched for hours, but can't find the problem...

Thanks for any help.

Answers

  • jannestigjannestig Member Posts: 1,000
    Does your modification leave the lines in there to be inserted everytime the Journal is opened.

    The message means that there is usually no amount or QTY to post

    it might by that those lines remain though the amout/qty is cleared almost like a recurring journal
  • KarelKarel Member Posts: 12
    Hello jannestig

    The amounts and quantities are just what I want, and both postings come trough in the Job ledger entries, so that's not the problem!

    For some reason Navision doesn't clean up the Job Journal lines when you try to run "JobJnlPostLine.RunWithCheck" twice.

    ???
  • KarelKarel Member Posts: 12
    Problem solved.

    I did clear the codeunit variable: "CLEAR(JobJnlPostLine);", and that caused the error. So don't clear the codeunitvariable between calls or Navision gets lost.
Sign In or Register to comment.