Skip to main content
Solved

Custom Event (Error Prompt) on Work Order Status Change

  • March 24, 2022
  • 2 replies
  • 489 views

Forum|alt.badge.img+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;

Best answer by Bhagya Wickramasinghe

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

 

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+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

 


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Customer)
  • March 25, 2022

Thanks! That was a lot simpler and works great.