Solved

IFS Event Action - Online SQL Warning

  • 2 November 2020
  • 3 replies
  • 2312 views

Badge +3

I am trying to create a Custom Event in IFS 8 - “CRO Receive Part” to Display an Alert if a user tries to save when the Serial No on the Receive does not match the one on the “Component Repair Order”.

I am able to use Error_Sys.Record_General to display a message  and force the user to go back, however, sometimes it is OK that the Serial No is different. I would like the user to be able to Click ‘Cancel’ to go back and ‘Continue’ if it is OK.
 

I have tried to use Client_Sys.Add_Info and Client_SYS.Add_Warning, but they do nothing.

What am I missing?

 

DECLARE
  CURSOR cro_line_cursor
  IS
  SELECT clt.cro_no, clt.line_number, clc.cf$_reported_serial_no serial_no
    FROM cro_line_tab clt
        ,cro_line_cft clc
   WHERE clt.rowkey = clc.rowkey
     AND clt.cro_no = '&NEW:CRO_NO'
     AND line_number = '&NEW:LINE_NUMBER'
     AND contract = '&NEW:CONTRACT';
BEGIN
  FOR cro_line_rec IN cro_line_cursor LOOP
    IF '&NEW:SERIAL_NO' != cro_line_rec.serial_no THEN
      Error_Sys.Record_General('company site issue','Incorrect Serial No, it should be "' || cro_line_rec.serial_no || '"');
      --Client_SYS.Add_Warning('Serial No Error', 'Incorrect Serial No, it should be "' || cro_line_rec.serial_no || '"', 'Err', 'Error');
      --Client_Sys.Add_Info('Serial No Error', 'Incorrect Serial No, it should be "' || cro_line_rec.serial_no || '"', 'Err', 'Error');
    ELSE
      Client_Sys.Add_Info('LU','Serial No OK');
    END IF;
  END LOOP;
END; 

icon

Best answer by Technical Outlaws 2 November 2020, 23:01

View original

3 replies

Userlevel 5
Badge +11

Information Message (Client_SYS.Add_Info) - This only works in custom events where the event action is triggered against the standard new, modify or remove process … it is the info_ out variable that needs to be handled by the client which makes this possible.

 

Warning Message (Client_SYS.Add_Warning) - This is currently not supported by the framework.

 

Have a look at the following community links.

 

Custom block PL/SQL and only popup window information

Yes / No Dialog Box

How use Info messagebox on events?

Badge +3

I ended up using the suggestion from CallumW on the “Yes/No Dialog Box” Link. However, instead of using a Custom Field, I used the Notes field and had the user add an “Override” string that I would not have to create another Custom Field.

It is not a perfect solution, but it satisfies the need.

Userlevel 3
Badge +7

Probably not what you want to hear, but when/if your customer goes to IFS Cloud, you might be able to use a Workflow of type User Interaction.

https://docs.ifs.com/techdocs/22r2/040_tailoring/500_business_process_automation/020_what_are_workflows/#user-interaction

Reply