Deleting Purh. Rcpt. Lines with a Zero Qty.

atankersley
Member Posts: 32
I have made a custom program to link all purchase lines to either a transfer order to a branch or a sales order to a customer. Because we now print pick labels for the transfer and sales orders when we receive these purchase orders, we only post and receive one line at a time.
The problem is that we create a lot of Purh. Rcpt. Lines with a zero Qty. This is becoming an issue and I would like to first change the code in the Purch Post to not create Purh. Rcpt. Lines with a zero Qty and then delete out all Purh. Rcpt. Lines with a zero Qty. Will doing this cause any problems that you know of with other processes in the future?
The problem is that we create a lot of Purh. Rcpt. Lines with a zero Qty. This is becoming an issue and I would like to first change the code in the Purch Post to not create Purh. Rcpt. Lines with a zero Qty and then delete out all Purh. Rcpt. Lines with a zero Qty. Will doing this cause any problems that you know of with other processes in the future?
tank
0
Comments
-
atankersley wrote:I have made a custom program to link all purchase lines to either a transfer order to a branch or a sales order to a customer. Because we now print pick labels for the transfer and sales orders when we receive these purchase orders, we only post and receive one line at a time.
The problem is that we create a lot of Purh. Rcpt. Lines with a zero Qty. This is becoming an issue and I would like to first change the code in the Purch Post to not create Purh. Rcpt. Lines with a zero Qty and then delete out all Purh. Rcpt. Lines with a zero Qty. Will doing this cause any problems that you know of with other processes in the future?
That's a bit of a baited question.
The answer is that if you do it right it wont be a problem. But don't mess it up or you could screw things up.David Singleton0 -
Any suggestions on how not to mess it up.tank0
-
Dont delete.. instead filter it, to show only whose quantity is greater than zero0
-
We would like to do the same thing. here's the background info:
we are using NAV2009 R2. We just merged operations with another company. We purchased their inventory using 2 large purchase orders (4000 lines and 2000 lines). we've made several (1000 or more) purchase receipts per PO. So we have millions of new purch. rcpt. line records -- most where qty = 0.
to keep db small and not storing useless info, I'd like to purge all these purch. rcpt. line records where quantity = 0. Can I do this with a batch report? or directly in SQL?
I know I can delete the header and it will delete the lines, but I'm not ready to purge the header for at least another year.0 -
LibertyMountain wrote:We would like to do the same thing. here's the background info:
we are using NAV2009 R2. We just merged operations with another company. We purchased their inventory using 2 large purchase orders (4000 lines and 2000 lines). we've made several (1000 or more) purchase receipts per PO. So we have millions of new purch. rcpt. line records -- most where qty = 0.
to keep db small and not storing useless info, I'd like to purge all these purch. rcpt. line records where quantity = 0. Can I do this with a batch report? or directly in SQL?
I know I can delete the header and it will delete the lines, but I'm not ready to purge the header for at least another year.
As long as the receipt line has been invoiced, its no problem to delete it. just look at the code in the ondelete trigger and it will be obvious which lines can be deleted.David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions