This content has been marked as final. Show 2 replies
Put logic in your PROCESS_BUTTON that checks :SYSTEM.FORM_STATUS. If it is 'CHANGED', then display an alert.
1. Create an Alert:
- Under the Alerts node create a new one.
- Assign a name like UNSAVED_CHANGES_ALERT
- Give it a Title like "Unsaved Changes"
- Choose an Alert Style - Caution for example
- Set Button 1 Label to "OK"
- Leave the other Button labels null so only one button is displayed in the alert.
- Set the Default Alert Button to "Button 1"
- Assign any visual attributes, colors, fonts, etc...
2. In your PROCESS_BUTTON WHEN-BUTTON-PRESSED trigger add something like this:
Hope this helps - mike
declare v_alert alert; button_pressed number(12); begin if :SYSTEM.FORM_STATUS = 'CHANGED' then v_alert := FIND_ALERT('UNSAVED_CHANGES_ALERT'); button_pressed := show_alert(v_alert); raise form_trigger_failure; end if; end;
if :SYSTEM.FORM_STATUS = 'CHANGED' thenThank you so much before I tried to check the status using :stage_block.status = 'NEW' and GET_RECORD_PROPERTY
but doesn't help me,as you suggested :SYSTEM.FORM_STATUS is solved my problem.