Issue with Copy and Pasting Rows in Sales Invoice

engsiong75engsiong75 Member Posts: 143
edited 2014-10-31 in NAV Three Tier
Hi

I have a user who regularly copies and paste sales invoice line in Navision. He is only copying rows with description column and then pasting the rows with description to a different row.

Eg.
From this
Type No. Description Quantity Unit Price Line Discount Amount
Item A Test Item 5 1.00 0.00
XXXX
YYYYY
Item B Testing 5 1.00 0.00
To this
Item A Test Item 5 1.00 0.00
XXXX
YYYYY
Item B Testing 5 1.00 0.00
XXXX
YYYYY


In NAV 2013 R2, this is not an issue as the user can use the Copy Rows and Paste Rows function. This is no problem if the user copies rows within the same sales invoice. Eg. The user selects all the rows and then click the Copy Rows function. Then go to a new line and then Paste rows.

However, if the user copies the rows and then paste it in Excel. Then recopy the exact rows and columns back into Sales Invoice, the program starts to behave differently. At that point, I will get error message that the "Quantity must have a value in the Sales Line: Document Type = Invoice, Document No.= XXXX, Line No.=0. It cannot be zero or empty."

Once I troubleshoot the code, I found that the issue is that the Invoice Discount Amount field is being Activated. This causes the "TestField(Quantity);" code to be trigger which results in the error.

Query:
Why is it that when I copy and paste from the same page, I do not encounter any error but as soon as I have to copy and paste it to Excel, copy the same unchanged data, using the same column and row, I get an error message?

Please don't suggest hiding the field Line Discount Amount as the user needs to see the field for the lines with Type Item.

Thank you,

Tan Eng Siong

Comments

  • tinoruijstinoruijs Member Posts: 1,226
    engsiong75 wrote:
    Query:
    Why is it that when I copy and paste from the same page, I do not encounter any error but as soon as I have to copy and paste it to Excel, copy the same unchanged data, using the same column and row, I get an error message?

    Good question. Maybe a bug.

    But how much does this occur? Users don't need to copy and paste it to Excel each time I assume.
    Perhaps the error does not occur when you refresh just before the last copy?

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • engsiong75engsiong75 Member Posts: 143
    Hi

    The issue is that there are time when the user can recycle the description by copying rows from the top to rows at the bottom. At other times, the user has to go copy the data to Excel and then run some macro\formula so that the data in the Description column changes according to some logic.

    I have tried refreshing before copying and before pasting. There is no difference to the outcome.

    Thank you,
Sign In or Register to comment.