Error when posting Sales Order

Scott_MejaScott_Meja Member Posts: 30
When posting the sales Order, i am getting the following error:

You must specify Gen.Prod.Posting Group in Sales Line Document of Type='Order' and Document No.='xxxx',Line No.='20000'.

As there is nothing to post in Line No. 20000.

When i used the debugger to find out where the error is coming from then in Codeunit 80 Sales-Post\OnRun(),SalesLine.TESTFIELD

("Gen. Prod. Posting Group");

Please advice the Solution. where do i need to modify the code.

Comments

  • kapamaroukapamarou Member Posts: 1,152
    What are the contents of line 20000?
  • Scott_MejaScott_Meja Member Posts: 30
    No contents (or no record) in Line No. 20000.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Which Vesrion u r using?

    can u show the image of error and sales order?
    so dat we can help :-k
  • Scott_MejaScott_Meja Member Posts: 30
    NAV 5.0 SP1.
    I have inserted the image.Pls check it out and help.
    img.bmp 872.5K
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    See that no.of posting lines is showing 2..

    thats why u r getting that error,

    open the sales line table and check how many lines are there for the presend sales header
  • kapamaroukapamarou Member Posts: 1,152
    Have you applied a filter on the subform?
  • Scott_MejaScott_Meja Member Posts: 30
    I checked in sales line table the no. of posting lines is only one and no filter has been applied on subform.
  • AdamRoueAdamRoue Member Posts: 1,283
    What is the line number of the line you are trying to post (CTRL+F8)?

    Do you have any modifications to add freight etc to a posted order automatically? In fact any modifications here at all, because there could be a setup here not configured correctly.
    The art of teaching is clarity and the art of learning is to listen
  • ariukaariuka Member Posts: 19
    I've encountered same problem right now... did you solve this.. what was the reason..
  • rhpntrhpnt Member Posts: 688
    Rounding line maybe?
  • frost_amofrost_amo Member Posts: 22
    First of all I suggest you to check "Calc. Inv. Discount" field value on the "Sales & Receivables Setup" form. If the check box is checked and "your" customer has Service Chagre specified on the "Cust. Invoice Discounts" form, the program will create addidtional sales line (with Type G/L Account) during the posting prosess.
    If this is true, you should check posting groups of a "Service Charge Acc." which is used for creation of this additional line. To do this you should open Customer Card (Invoicing Tab), click Lookup button on the Customer Posting Group text box. There you can find "Service Charge Acc." collumn.

    Good luck.
  • bob_upbob_up Member Posts: 155
    I had a similar problem, trying to post a sales order for which I had previously posted a prepayment invoice. The problem was solved by assigning a Gen. Prod. Posting Group code to the G/L Account that I was using for Sales Prepayment, as defined in General Posting Setup. The posting codeunit had created a new line for the prepayment and was looking to that G/L account for the Gen. Prod. Posting Group code.
Sign In or Register to comment.