Delete production order

j.marselo
Member Posts: 102
i have a situation of repeating production order no., but it will only happen to a previously existed Finished prod. order.
my plan is to allow deletion of finished produciton order.
to achieve this, i will modify tables:
5405 - Production Order
5406 - Prod. Order Line
5407 - Prod. Order Component
5409 - Prod. Order Routing Line
5410 - Prod. Order Capacity Need
these tables contains code lines to restrict the deletion.
i plan to modify a bit to enable me to delete a finished production order and all related tables.
here what we have in the those tables.
in table 5405:
on table 5406, 5407, 5409:
In evaluating the effects:
I consider, we have the record in the Item Ledger Entry anyway, in case we need to see the history.
We only can not see the finished prod. order appear when Navigate the entries.
Anyone here has ideas?
Compare to enable renaming the field:"No." - WHICH ONE is easier to accomplish?
Any comments are highly appreciated.
Thank you.
my plan is to allow deletion of finished produciton order.
to achieve this, i will modify tables:
5405 - Production Order
5406 - Prod. Order Line
5407 - Prod. Order Component
5409 - Prod. Order Routing Line
5410 - Prod. Order Capacity Need
these tables contains code lines to restrict the deletion.
i plan to modify a bit to enable me to delete a finished production order and all related tables.
here what we have in the those tables.
in table 5405:
OnDelete() ---------- IF Status IN [Status::Released,Status::Finished] THEN BEGIN ItemLedgEntry.SETCURRENTKEY("Prod. Order No."); ItemLedgEntry.SETRANGE("Prod. Order No.","No."); IF ItemLedgEntry.FIND('-') THEN ERROR( Text000, Status,TABLECAPTION,"No.",ItemLedgEntry.TABLECAPTION); ...I will change:
IF Status = Status::Released THEN BEGIN //the rest are the same ...
on table 5406, 5407, 5409:
OnDelete() ---------- IF Status = Status::Finished THEN ERROR(Text006,Status,TABLECAPTION) ...I will change:
{IF Status = Status::Finished THEN ERROR(Text006,Status,TABLECAPTION) } //just put in bracket ...
In evaluating the effects:
I consider, we have the record in the Item Ledger Entry anyway, in case we need to see the history.
We only can not see the finished prod. order appear when Navigate the entries.
Anyone here has ideas?
Compare to enable renaming the field:"No." - WHICH ONE is easier to accomplish?
Any comments are highly appreciated.
Thank you.
0
Comments
-
I don't think it's a good idea to delete the finished prod.orders. The inventory batch uses the field "Completly invoiced" in tabel 5406, not sure if that's the case in 4.0 sp2 though.
Anyway you must not delete prod.orders where the cost haven't been adjusted.
The deleting of record might cause problems later on in upgrades etc. that one can't know of now.
If reusing prod.order no.'s is something you must do then you instead could change so that when you change status to finished the finished prod.order is assigned another no. then the released on, then you can reuse prod.order no.'s but the finished prod.order has it's on no. serie. So no deleting is needed._____________________
NAV Freelance Consultant0 -
Noname,
If I sum up all points you stated about deleting finished production order, I can not see a real serious effects.
In short, you mention about "Completly invoiced" field in tabel 5406 but you are not sure, the cost of finished production order may be not adjusted yet - where I'm doubtful of this , and a not-known possible problem on upgrade ...
So, compare to the effort of changing "No." field in Production Order table (for Status::Finished), which one is easier and simpler to accomplish?
Thank you for the comments.0 -
Concluding this, enable renaming the Finished Production Order No. is a lot simpler.
Only need to deactivate the line in OnRename() trigger in Prod. Order table.0 -
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