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;