thanks for the information andrew. I have added this feature into a copy of the standard KeyControl. It works well for me. Although, maybe I shouldn’t have gone that way as it turned out to be quite complex, involving quite a few other standard objects. I just cant help myself :).
Now, I still have a small issue. When the item no. changes, the existing unit of measure code assigned for previous item no. could no longer be valid for the new item no. How could I make UOM code show as red? When i type invalid data in this control, system shows this field as red, preventing user from saving the record. I want system to do the same when it becomes invalid due to item no. changes.