Sales Statistics not working with comment lines

SambSamb Member Posts: 18
I am trying to open the statistics of a Sales Order and/or Sales Cr. Memo, but I keep getting the attached error. I have tried this in both my clients database and the base database from Microsoft version 2009 R2. It is not working in either database or with either client. I have tried looking through the hotfixes provided by Microsoft and did not see anything or was looking for the wrong thing. I have tried searching here and also did not see anything.

The steps I took were:

1) Create new Sales Order
2) place two items on the lines with a quantity of 1
3) view statistics (works fine at this point)
4) add comment line below second item
5) view statistics again (this time I get the error).

It was the same for the Cr. Memos. Has anyone seen this before or know how to fix this issue.

Comments

  • SavatageSavatage Member Posts: 7,142
    Turn on the debugger & see where it stops.

    very curious myself!
  • SambSamb Member Posts: 18
    With the debugger on it stops in Codeunit 80 on the function SumSalesLines2. It is breaking on a call to NewSalesLine.INSERT;

    I have attached the snippet of code where it breaks. The variable InsertSalesLine is boolean that is passed in. As this is standard NAV code I am hesitant to change this.
  • MBergerMBerger Member Posts: 413
    Just a little question, did you change the sorting on the sales lines in the form, perhaps ? That, in combination with the AutoSplitKey of the sales line form can sometimes cause problems like this.
  • SambSamb Member Posts: 18
    I had not changed the sort on the Sales Line.

    I think I have a solution to my problem at least. I have added a new filter to the SumSalesLines2 function.
Sign In or Register to comment.