Solved

Custom Event (Error Prompt) on Work Order Status Change

  • 24 March 2022
  • 2 replies
  • 345 views

Badge +2

I’m trying to create a new custom event for Work Order Status Change, that fires an error message if the status is changed from ‘PREPARED’ to “WORKDONE’, that warns the user that they have to first set the status to ‘STARTED’ before changing status to ‘WORKDONE’.

 

Can someone help me out with the SQL code I need to write? The below doesn’t work for me.

 

--

 

DECLARE

CURSOR get IS 

SELECT '&OLD:WO_STATUS_ID'

FROM ACTIVE_SEPARATE_CFT


WHERE 

'&OLD:WO_STATUS_ID' = 'PREPARED'

BEGIN

   IF '&NEW:WO_STATUS_ID' = 'WORKDONE' THEN
         Error_SYS.Appl_General('ERROR!', 'You must set WO status as STARTED before you can select WORK DONE');
   END IF;

END;

icon

Best answer by Bhagya Wickramasinghe 25 March 2022, 04:06

View original

This topic has been closed for comments

2 replies

Userlevel 5
Badge +13

Hi @kennethevers

,

I think you can easily configure it via the following approach.

Note: Assumed that the specific WO is in the ‘Active Work Orders’ window.

    1. First create the event (highlighted in yellow)

         Refer attachment 1.
 

  1. Create the action, using the option “Create New Action” in the Event window.

            Refer attachment 2
            Note: Make the Action Enabled; Then only the event too would get enabled.

 

Check whether your requirement is met.

Hope this would help to resolve your issue.
 

Best Regards,

Bhagya

 

Badge +2

Thanks! That was a lot simpler and works great.