Home » Developer & Programmer » Forms » Raise form_trigger_failure (Oracle Form 6i)
Raise form_trigger_failure [message #426679] Sun, 18 October 2009 21:26 Go to next message
lekshman
Messages: 4
Registered: October 2009
Location: Banglore
Junior Member
hi all.. below is my code. the requirement is simple. there are 3 buttons. when i press No and Cancel, the changes which i make should not get saved.But in this case, it is getting saved.The raise form_trigger_failure is not raised. can sum1 help me in this case.
IF v_status<>'PRODUCTION' THEN
  FND_MESSAGE.SET_STRING('The item status is Not Production.'||chr(10)|| 'A Scheduling OR Cancel Action has been triggered. '||chr(10)|| 'Do you want to continue with the transaction?'||chr(10)|| 'Item Type : '||v_item||chr(10)||'Item Status : ' ||v_status||chr(10)||'Item Product Line: '||v_item_line||chr(10)||'Planner Name : '||v_name);
  l_button_selected:=fnd_message.question(button1 => 'Cancel', button2 => 'No', button3 => 'Yes', default_btn => 2, cancel_btn => 1, icon => 'question');
  fnd_message.show;
  IF l_button_selected = 1 THEN -- 1 cancel
    v_test            :='cancel';
    FND_MESSAGE.SET_STRING('This is a test message confirmation_1'||l_button_selected);
    fnd_message.error;
    Raise form_trigger_failure ;
  END IF;
  IF l_button_selected = 2 THEN -- 2 No
    FND_MESSAGE.SET_STRING('This is a test message confirmation_2'||l_button_selected);
    fnd_message.show;
    fnd_message.error;
    Raise form_trigger_failure;
  END IF;
  IF l_button_selected = 3 THEN -- 3 Yes
    FND_MESSAGE.SET_STRING('This is a test message confirmation_3'||l_button_selected);
    fnd_message.show;
    NULL;
  END IF;
END IF;
END IF;
EXCEPTION
WHEN OTHERS THEN
  Raise Form_Trigger_Failure ;
END;

[Updated on: Mon, 19 October 2009 01:15] by Moderator

Report message to a moderator

Re: Raise form_trigger_failure [message #426726 is a reply to message #426679] Mon, 19 October 2009 03:16 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Changes are saved? What saves them? There's no COMMIT in this piece of code.

Do you see an appropriate message when selecting buttons 1, 2, and 3? In other words, does IF do its job?

Also, remove that silly WHEN OTHERS as it does nothing.
Re: Raise form_trigger_failure [message #426747 is a reply to message #426679] Mon, 19 October 2009 05:28 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
It'd also help if you told us what trigger this code comes from.
Re: Raise form_trigger_failure [message #426800 is a reply to message #426747] Mon, 19 October 2009 14:47 Go to previous message
lekshman
Messages: 4
Registered: October 2009
Location: Banglore
Junior Member
The trigger was WHEN-VALIDATE-RECORD.

the issue is resolved now.

it was coz of not giving the raise form_trigger_failure in the exceptions below this code.

when we gave the raise form_trigger_failure in the below exceptions, it got worked out correctly.

thanks ppl..
Previous Topic: FRM-40600 Record has already been inserted (after upgrading)
Next Topic: migration from IDS 6i to 10g
Goto Forum:
  


Current Time: Thu Apr 25 10:18:37 CDT 2024