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:
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 is easier to accomplish?
Any comments are highly appreciated.
Thank you.