Home » Developer & Programmer » Forms » (Custom.pll) Raise FORM-TRIGGER-FAILURE
(Custom.pll) Raise FORM-TRIGGER-FAILURE [message #230877] Fri, 13 April 2007 03:17 Go to next message
sinem
Messages: 2
Registered: April 2007
Location: Turkey
Junior Member

Hi everyone,
I'm really sorry if this is not the right place to post this topic. I'm coding in custom.pll and i want to summarize my problem. There is a table 'xx_payroll.my_debug' When a wrong data is entered a different trigger fires and writes an error message to this table.And in Post-Forms-Commit trigger i read the error from table which has a login_id equal to users login_id, i show the error message to user then delete message from table and i have to prevent the data to be saved.I use raise form trigger failure it throws exception but saves the data. Do you have any explanation? Below is part of my code:


if (form_name = 'PERWSEAD') and ( block_name = 'ABA') and (event_name = 'POST-FORMS-COMMIT') then
BEGIN
v_login_id_now := apps.fnd_profile.value('LOGIN_ID');
if v_login_id_now is not null then
select login_id,message
into v_login_id_table,v_error_message
from xx_payroll.my_debug
where login_id = v_login_id_now;
end if;

if (v_login_id_now = v_login_id_table) then
fnd_message.set_string('HATA : '|| v_error_message);
fnd_message.error;
DELETE FROM xx_payroll.my_debug
where login_id = v_login_id_now;
RAISE FORM_TRIGGER_FAILURE; end if;

exception when no_data_found then
v_login_id_table:=null;
when others then
fnd_message.set_string('ERROR CODE: '||TO_CHAR(SQLCODE));
fnd_message.show ;
END;
END IF;


Thanks a lot..

sinem
Re: (Custom.pll) Raise FORM-TRIGGER-FAILURE [message #231152 is a reply to message #230877] Sun, 15 April 2007 02:55 Go to previous messageGo to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member
Hello,

Try the key-commit event instead.

Kind regards,

Mike Verkimpe.
Re: (Custom.pll) Raise FORM-TRIGGER-FAILURE [message #231154 is a reply to message #231152] Sun, 15 April 2007 03:14 Go to previous message
sinem
Messages: 2
Registered: April 2007
Location: Turkey
Junior Member

Hi Mark,
Thanks for your reply.But normally the KEY-COMMIT cannot be handled with CUSTOM.pll
Previous Topic: how to retrieve
Next Topic: HELP: To insert data into a table when the delete button in apps is pressed
Goto Forum:
  


Current Time: Thu Dec 08 00:04:39 CST 2016

Total time taken to generate the page: 0.17541 seconds