The TEMPLATE form contains several form-level triggers that must exist in order for other routines to operate properly. Specific rules about modifications you can safely make to these triggers are discussed below.
Attention: Under no circumstances may any of these triggers be deleted.
The text within these triggers must remain within the trigger; however, frequently developers need to add text before or after this text. These triggers are listed below.
Warning: You must not change triggers that are referenced into the form, even though it is technically possible in Oracle Forms Developer. Changing referenced triggers may cause problems in your form or may cause problems for future upgrades.
KEY-CLRFRM
KEY-COMMIT
KEY-DUPREC
KEY-EDIT
KEY-EXIT
KEY-HELP
KEY-LISTVAL
KEY-MENU
ON-ERROR
POST-FORM
PRE-FORM
WHEN-FORM-NAVIGATE (reference)
WHEN-NEW-BLOCK-INSTANCE
WHEN-NEW-FORM-INSTANCE
WHEN-NEW-ITEM-INSTANCE
WHEN-NEW-RECORD-INSTANCE
WHEN-WINDOW-CLOSED
WHEN-WINDOW-RESIZED
ACCEPT
CLOSE_THIS_WINDOW (reference)
CLOSE_WINDOW
EXPORT (reference)
FOLDER_ACTION
FOLDER_RETURN_ACTION
LASTRECORD (reference)
MENU_TO_APPCORE (reference)
QUERY_FIND
STANDARD_ATTACHMENTS (reference)
ZOOM (reference)
APP_STANDARD.EVENT('ACCEPT');
This trigger processes invocation of the "Action, Save and Proceed" menu choice or toolbar button. It saves and moves to the next record of the block specified as the First Navigation Block.
Replace the code in this trigger, or create block-level triggers with execution style 'Override'.
See: Save and Proceed
null;
This trigger allows customization of specific folder events.
Replace text with specific code needed to process folder actions.
Warning: Oracle does not support modifications to this trigger except for Oracle E-Business Suite internal use.
APP_STANDARD.EVENT('KEY-DUPREC');
This trigger disables the default duplicate record functionality of Oracle Forms.
To process the "Edit, Duplicate Record Above" menu choice properly, code a block-level KEY-DUPREC with execution style 'Override'. This trigger should perform a duplicate_record, then validate or clear fields as needed.
See: Duplicating Records
APP_STANDARD.EVENT('KEY-CLRFRM');
This trigger validates the record before attempting to clear the form.
Add any additional code after the supplied text. Typically you would add GO_BLOCK calls if you have alternative regions in your form, where the GO_BLOCK calls repopulate your region control poplist after a Clear Form operation.
APP_STANDARD.EVENT('KEY-MENU');
This trigger disables the Block Menu command of Oracle Forms.
To enable operation of Alternative Regions via the keyboard from a specific block, code a block-level KEY-MENU with execution style 'Override'. This trigger should open an LOV with the same choices as the Alternative Region control poplist.
See: Alternative Regions
APP_STANDARD.EVENT('KEY-LISTVAL');
This trigger performs flexfield operations or LOV invocation.
Create block- or item-level triggers with execution style 'Override' on fields using the Calendar, or fields that dynamically invoke flexfields.
See: The Calendar
APP_STANDARD.EVENT('ON-ERROR');
This trigger processes all errors, server or client side, using Message Dictionary calls.
To trap specific errors, check for your specific errors before the APP_STANDARD call.
declare
original_mess varchar2(80);
begin
IF MESSAGE_CODE = <your message number> THEN
original_mess := MESSAGE_TYPE||'-'||
to_char(MESSAGE_CODE)||': '||MESSAGE_TEXT;
--- your code handling the error goes here
message(original_mess);
ELSE
APP_STANDARD.EVENT('ON_ERROR');
END IF
end;
See: Overview of Message Dictionary
APP_EXCEPTION: Exception Processing APIs
APP_STANDARD.EVENT('POST-FORM');
This trigger is reserved for future use.
Add any additional code before the supplied text.
FND_STANDARD.FORM_INFO('$Revision: 120.5 $',
'<Form Name>',
'<Application Shortname>',
'$Date: 2010/05/20 19:35:22 $',
'$Author: appldev $');
APP_STANDARD.EVENT('PRE-FORM');
APP_WINDOW.SET_WINDOW_POSITION('BLOCKNAME',
'FIRST_WINDOW');
This trigger initializes internal Oracle E-Business Suite values and the menu. The values you enter here are shown when you choose "Help, About Oracle Applications" from the Oracle E-Business Suite menu.
You must modify the application short name. The application short name controls which application's online help file is accessed when the user presses the window help button on the toolbar. If you leave the application short name as FND, your user will not see any help because Oracle E-Business Suite will not be able to construct a valid help target.
The form name is the user form name (form title). This is for your reference only, and is not used elsewhere.
Oracle uses a source control system that automatically updates the values beginning with "$". If you are not using that source control system, you can and should modify those values with your own development information.
You must also modify the APP_WINDOW call to use your own block name (of your first block) instead of BLOCKNAME. Do not modify the string FIRST_WINDOW.
See: Controlling Window Behavior
APP_STANDARD.EVENT('QUERY_FIND');
This trigger issues a default message stating that Query Find is not available.
Replace the code in this trigger, or create block-level triggers with execution style 'Override' when you create a Find window or Row-LOV in your form.
See: Query Find Windows
FDRCSID('$Header: DEV00007306.htm 120.5 2010/05/20 19:35:22 appldev ship $');
APP_STANDARD.EVENT('WHEN-NEW-FORM-INSTANCE');
-- app_folder.define_folder_block('template test',
'folder_block', 'prompt_block', 'stacked_canvas',
'window', 'disabled functions');
-- app_folder.event('VERIFY');
The APP_STANDARD.EVENT call in this trigger supports the query-only mode invoked by FND_FUNCTION.EXECUTE. The FDRCSID call supports the Oracle E-Business Suite source control system. The APP_FOLDER calls are for Oracle E-Business Suite internal use only. Custom forms do not require either the FDRCSID or the APP_FOLDER calls, but it does no harm to leave them in the trigger.
Add any additional code before the supplied text.
Warning: Oracle does not support modifications to the APP_FOLDER calls in this trigger except for Oracle E-Business Suite internal use.
APP_STANDARD.EVENT('WHEN-NEW-RECORD-INSTANCE');
This trigger manages the state of the Oracle E-Business Suite menu and toolbar.
Create block-level triggers as needed, with execution style 'Before'.
See: Synchronizing
APP_STANDARD.EVENT('WHEN-NEW-BLOCK-INSTANCE');
This trigger manages the state of the Oracle E-Business Suite menu and toolbar.
Create block-level triggers as needed, with execution style 'Before'.
See: Synchronizing
APP_STANDARD.EVENT('WHEN-NEW-ITEM-INSTANCE');
This trigger manages the state of the Oracle E-Business Suite menu and toolbar.
If you add a flexfields routine call, you should add it before the APP_STANDARD.EVENT call. In general, you should not add any other code to this trigger, as such code would affect every item in the form and could hurt your form performance.
Create block-or item-level triggers as needed, with execution style 'Before'.
See: Synchronizing
Oracle E-Business Suite does not support the modification of these form-level triggers in any way.
This trigger invokes APP_CUSTOM.CLOSE_WINDOW from the menu Action->Close Window.
APP_CUSTOM.CLOSE_WINDOW(:SYSTEM.EVENT_WINDOW);
This trigger processes all window close events. Code that processes the close window events must reside in the APP_CUSTOM.CLOSE_WINDOW package.
See: Controlling Window Behavior
app_standard.event('EXPORT');
This trigger processes invocation of the "Action, Export" menu choice.
app_folder.event(:global.folder_action);
This trigger processes invocation of entries on the Folder menu.
APP_STANDARD.EVENT('KEY-COMMIT');
This trigger processes commits in normal or called forms.
Warning: Oracle strongly recommends against the use of called forms. This procedure supports them for backward compatibility only.
APP_STANDARD.EVENT('KEY-EDIT');
This trigger performs flexfield operations, or Calendar or Editor invocation.
APP_STANDARD.EVENT('KEY-EXIT');
This trigger processes Close events, and leaves enter-query mode.
APP_STANDARD.EVENT('KEY-HELP');
This trigger invokes the Window Help system.
APP_STANDARD.EVENT('LASTRECORD');
This trigger processes the menu event Go->Last Record.
APP_STANDARD.EVENT(:global.menu_to_appcore);
This trigger supports the Special menu.
atchmt_api.invoke;
This trigger processes invocation of the Attachments menu entry or toolbar button.
execute_trigger('CLOSE_WINDOW');
This trigger centralizes window close events from the Oracle E-Business Suite or Window Manager menu.
You cannot modify this referenced trigger. It enables certain standard behaviors, such as normalizing a minimized form when it is navigated to.
To make use of this form event, populate a global variable called GLOBAL.WHEN_FORM_NAVIGATE with the name of a user-named trigger. Usually you populate this global immediately before issuing a GO_FORM.
See: Passing Instructions to a Form
appcore_custom.event('ZOOM');
This trigger processes invocation of the "Action, Zoom" menu choice or toolbar button.