cancel
Showing results for 
Search instead for 
Did you mean: 

MenuUID - 1284 - Cancel - prevention

Former Member
0 Kudos

Hi,

I'm using the SBO 2004C version

I'm in need of preventing the user from canceling some Production orders (or atleast, I need to reset some UserDefinedFields, before the user does cancel the PO).

I've tried handling the Application.MenuEvent "1284", but I'm unable to handle it before the document gets erased. The soonest possible event, I'm able to handle, is right after the Production Order has been canceled, the form gets cleared and reloaded. At this point, the pval.BeforeAction is false. Which is too late.

I've also tried the Disabling the "1284" - Cancel menu, but even when I do set it to enabled = false, nothing happends. In debug mode, I can see, that the menu has the enabled = false value, but when I do get back into application, I can see, that the menu is enabled again.

(was trying to disable it in the et_FORM_ACTIVATE event, pval.beforaction is false ... and also in MenuEvents handling the next/previous document)

As I said in the beginning, all this is required due to changing some UserDefinedFields both in the ProductionOrder and ProductionOrderLines (OWOR and WOR1, and some linking to the OITW userDefinedFields)...

But when the ProductionOrder gets Canceled status, I'm unable to modify/update the ProductionOrder's UserDefinedFields (I can modify the items userfields, but I do not know, which Production order was canceled, because the form does not contain the last Canceled ProductionOrder, and it goes to the Add mode directly).

Any idea, how to solve this problem?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Jaroslav,

You can use the SBO_SP_TransactionNotification stored procedure for this. If you don't know how it works try to look in this forum and search for "SBO_SP_TransactionNotification", or if you need extra help on this let me know.