Skip to main content
Question

Event action is not working

  • March 16, 2026
  • 5 replies
  • 79 views

Forum|alt.badge.img+10
  • Sidekick (Customer)

Hello,

 

I created custom event. In one view are columns: cost_for_transport and cost_for_material. We have some order and this order wouldnt be possible to close without prefilled this two costs. 

 

This is my custom event 

and this is the event action: 

CF$_C_NAKLADY_NA_DOPRAVU is cost_for_transport 

CF$_C_NAKLADY_NA_MATERIAL is cost_for_material

 

and this is Oracle SQL statement: 

DECLARE     
v_category NUMBER; 
BEGIN      

SELECT case_category_id     
INTO v_category     
FROM cc_case_tab     
WHERE case_id = :case_id;      

IF v_category = 100 THEN        
 raise_application_error(-20001,'You cant close order_no without prefilling costs for material and costs for transport.' );     
END IF;  

END;

 

but when I tried to close some order_no with or wothout prefilled costs, it doesnt work and I dont know why. 

 

Thanks for your advices

5 replies

Forum|alt.badge.img+10
  • Hero (Customer)
  • March 16, 2026

Hi ​@Ed22 

I’m not sure how you are intending this to work, but as defined the event should only fire if either CF$_C_NAKLADY_NA_DOPRAVU or CF$_C_NAKLADY_NA_MATERIAL is changed.  If you close the order without changing these fields then the event would not fire.

Separately, I think the conditions on the event action mean that it will only fire if both fields are NULL.  To investigate what is happening, try removing the conditions and see if the event fires.

Also, your query in the event action is referencing :case_id.  What is this and where are you expecting this to come from?

It many be worth having one line of PLSQL code which always raises an error as a first example to check that the event has actually fired.  You can then add functionality to the PLSQL code as needed.

I’ve used several custom events but I haven’t actually used them on customised tables such as you are doing, but I hope this reply helps you.

mmck


Forum|alt.badge.img+10
  • Author
  • Sidekick (Customer)
  • March 16, 2026

It works separately, for example, when I change rowstate from open to close, it wont allowed me, and if I input some number to the costs, it wont allowed me, but I want combine this result. 

 

custom fields for costs are in entity CcCase in table CC_CASE_CFT AND

rowstate is in entity CcCase in table CC_CASE_TAB


Forum|alt.badge.img+10
  • Hero (Customer)
  • March 17, 2026

Hi @Ed22

Does the case_id exist in the CC_CASE_CFT table?  I think you need some way of linking the tables, presumably the case_id, and then you need to include the case_id as an attribute for the event action so that you can use it in the PLSQL.

mmck


Forum|alt.badge.img+10
  • Author
  • Sidekick (Customer)
  • March 17, 2026

No, case_id is not in CC_CASE_CFT


Forum|alt.badge.img+10
  • Hero (Customer)
  • March 17, 2026

Sorry, as I mentioned, I haven’t used custom events on customised fields, but there may be some information here which helps you - it seems an option is to put the event on the core IFS table and then you can check your customised fields