Microsoft KB Archive/945439

= Copy to Document functionality does not bring over Quantity like Copy Document functionality =

Article ID: 945439

Article Last Modified on 11/20/2007

-

APPLIES TO


 * Microsoft Dynamics NAV 5.0
 * Microsoft Dynamics NAV 4.0

-



Source: Microsoft Support



RAPID PUBLISHING
RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.



Action
I am using the Copy to Document functionality within the Sales & Marketing area and noticed that the Quantity field is not populating when the new document is created. When I run the following replication steps, why does this occur?

Replication steps:

From a base NAV version 5.0 or any version of 4.0

1. From the main Sales & Marketing menu, click Order Processing and then choose Orders

2. From the Sales Order dialog box, click F3 to create a new Order

3. Choose 10000 as the Sell To Customer No., tab off of that field and leave all defaults for the remainder fields

4. On the right hand side under Customer Information, click Sales History. This should bring up the Customer Sales History dialog box

5. Click Posted Invoices

6. Highlight the lines with Document No. 103018 and the line directly below it.

Information should contain the following:

Document No.: 103018

Type: Item

No.: 1964-W

Description: INNSBRUCK Storage Unit/G.Door

Unit of Measure Code:PCS

Quantity:10

Document No.: 103018

Type: Item

No.: 70011

Description: Glass Door

Unit of Measure Code: PCS

Quantity: 5

7. Click the Copy to Doc. button

Result: The Quantity field for both line items is 0.



Result
When I complete the process the Quantity from the copied document does not show up on the current document.



Cause
The reason being is in codeunit 7172 the function CopyLine, the Quantity field is specifically set to 0.

VALIDATE(&quot;Unit of Measure&quot;,FromSalesLine.&quot;Unit of Measure&quot;);

VALIDATE(&quot;Unit of Measure Code&quot;,FromSalesLine.&quot;Unit of Measure Code&quot;);

VALIDATE(Quantity,0);

IF NOT (FromSalesLine.Type IN [FromSalesLine.Type::Item,FromSalesLine.Type::Resource]) THEN BEGIN



Resolution
This is working as designed functionality.



DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

Keywords: kbmbssalesandreceivables kbnomt kbrapidpub KB945439

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.