How can I prevent the user from changing WO status?

progresslover

New Member
Hello everyone,

I would like to prevent the users from changing the work order status (wo_status) from "F"irm to "A"llocated when the Item status (pt_status) is still in "D" (Design). Is it possible to validate this field entry? Your help would be greatly appreciated.

Fareena.
 

gatsbyinca

New Member
How about a wrapper program where you insert some logic before running the standard program?

Or perhaps take a look at TailorPro...it lets you do a lot of these kinds of customizations without the need to modify source code.
 

ovf

Member
I would imagin that a wrapper program like:

{mfdeclre.i}
DEFINE BUFFER bpt FOR pt_mstr.
ON ASSIGN OF wo_mstr.wo_status OLD ostatus
DO:
IF OSTATUS = "F" and can-do("R,C",wo_mstr.wo_status) THEN
DO:
FIND bpt WHERE bpt.pt_part = wo_mstr.wo_part NO-LOCK NO-ERROR.
IF AVAILABLE bpt AND bpt.pt_status = "D" THEN
DO:
MESSAGE "This Item is stil in Design, you can't change status"
VIEW-AS ALERT-BOX ERROR.
RETURN ERROR.
END.
END.
RETURN.
END.
/* Menu program as I recall it */
{gprun.i ""wowomt.p""}

would do the trick - this could be a wrapper program before the program like wowomt.p or even at a very global level before mf.p

Ole
 
Top