You are on page 1of 5

Oracle Notifications: How to Modify standard contend

Below are details from Workflow guide to Hide some standard buttons/content in the
Notification mailer
#HIDE_MOREINFO Attribute:
If you are using the Oracle Applications Framework-based version of the Worklist pages
available with Oracle Workflow embedded in Oracle Applications, you can use a special
message attribute with the internal name #HIDE_MOREINFO to hide the Request Information
button in the Notification Details page. When users view a notification that requires a
response from their Worklist page, the response region in the Notification Details page
includes the Request Information button by default. If you want to prevent users from
requesting more information about a notification, you can add the #HIDE_MOREINFO
attribute to control whether the Request Information button is displayed or hidden.
Note: In both the standalone version of Oracle Workflow and the Oracle Applications version
of Oracle Workflow, the #HIDE_MOREINFO attribute also determines whether the Request
Information response link is included or excluded in HTML-formatted e-mail notifications.
However, note that if the #HIDE_MOREINFO attribute is not defined for a particular
notification, the default behavior is different for the Notification Details page and for HTMLformatted e-mail notifications. The Notification Details page displays the Request
Information button if the #HIDE_MOREINFO attribute is not defined, while an HTMLformatted e-mail notification will exclude the Request Information response link by default if
the #HIDE_MOREINFO attribute is not defined. To control this option in all interfaces where
users access notifications, you should explicitly define and set the #HIDE_MOREINFO
attribute. See: To Respond to an HTML E-mail Notification, Oracle Workflow User's Guide
The #HIDE_MOREINFO attribute must be either of type text or lookup. To hide the Request
Information button, set the value of this attribute to Y. To display the Request Information
button, set the value to N.
Note: It is recommended to define the #HIDE_MOREINFO attribute with a type of lookup and
assign it the predefined Yes/No lookup type that is provided in the Standard item type. The
Yes/No lookup type contains two lookup codes with the display names Yes and No,
representing the values Y and N, respectively.
If you always want to hide the Request Information button for notifications using a particular
message, specify the value Y as a constant.
If you only want to hide the Request Information button in certain cases, specify an item
type attribute as the value. Then include logic in your workflow process that dynamically
determines at runtime whether the button should be hidden or displayed and sets the item
type attribute to Y or N, respectively.
Note: The Oracle Workflow web pages are being converted to the Oracle Applications
Framework user interface format. Depending on your version of Oracle Workflow and which
patches you have applied, you may see Oracle Workflow web pages in the new format or in
the previous format. The new Worklist pages that include the Request Information button are
currently available for the version of Oracle Workflow embedded in Oracle Applications.
#HIDE_REASSIGN Attribute:
You can use a special message attribute with the internal name #HIDE_REASSIGN to hide

the Reassign button in the Notification Detail web page. When users view a notification from
their Worklist web page, the response section in the Notification Detail page includes the
Reassign button by default. If you want to restrict users from reassigning a notification, you
can add the #HIDE_REASSIGN attribute to control whether the Reassign button is displayed
or hidden.
Note: If you are using the Oracle Applications Framework-based version of the Worklist
pages available with Oracle Workflow embedded in Oracle Applications, the Notification
Detail page may include the Delegate button or the Transfer button instead of the Reassign
button, depending on the setting of the FND: Notification Reassign Mode profile option. The
#HIDE_REASSIGN attribute controls the Delegate button and the Transfer button in the same
way as the Reassign button. See: Setting the FND: Notification Reassign Mode Profile Option,
Oracle Workflow Administrator's Guide.
If you are using the Oracle Applications Framework-based version of the Worklist and home
pages available with Oracle Workflow embedded in Oracle Applications, then the
#HIDE_REASSIGN attribute also controls whether a notification can be reassigned using the
Reassign button in the Advanced Worklist, Personal Worklist, or self-service home page. The
Reassign button in these pages will still be displayed, but an error message will appear if
users attempt to reassign notifications for which the #HIDE_REASSIGN attribute has been
set.
The #HIDE_REASSIGN attribute must be either of type text or lookup. To hide the Reassign
button in the Notification Detail page, and to prevent reassignment from the Advanced
Worklist, Personal Worklist, and self-service home page, set the value of this attribute to Y. To
display the Reassign button in the Notification Detail page, and to allow reassignment from
the Advanced Worklist, Personal Worklist, and self-service home page, set the value to N.
Note: It is recommended to define the #HIDE_REASSIGN attribute with a type of lookup and
assign it the predefined Yes/No lookup type that is provided in the Standard item type. The
Yes/No lookup type contains two lookup codes with the display names Yes and No,
representing the values Y and N, respectively.
Oracle Apps: Working with Oracle Forms
Below are common points we need to incorporate while working on Oracle Forms
LOV for Date and Date time Fields
1. Make the field as "Text Item" and set the LOV to "ENABLE_LIST_LAMP"
2. Set validate from the List property for the Item to "No"
2. Create a Trigger "KEY-LISTVAL" for the Item with following code
calendar.show;
By default, the Calendar shows the month of the value in the date field
(if a value exists) upon first opening. If no specific date is supplied, the
Calendar shows the current month.
calendar.show([first_date]);
Set value of item/primary key using Sequence
:SEQUENCE. XXGL_ADP_SECURITY_HDR_SEQ.NEXTVAL in Intial value of the Item

Populate non database fields during Query in form


1. Create post query trigger on the Datablock
2. Set the fields by writing the code, in below example Employee number and name are non
database
fields which are populate based on the value of field person id(Database field)
PROCEDURE post_query is
begin
--Get the Person details
SELECT ppf.EMPLOYEE_NUMBER ,
ppf.FULL_NAME
into
:MAIN.EMP_NUM,
:MAIN.EMP_NAME
FROM per_all_people_f ppf
WHERE person_id =:MAIN.person_id
AND rownum =1;
--To prevent status change of the block
SET_RECORD_PROPERTY( :SYSTEM.TRIGGER_RECORD,'BLOCKNAME', STATUS,
QUERY_STATUS);
end post_query;
Display Messages in Oracle Forms:
--String Message
fnd_message.set_string ('SERial Num has been repaired more than 3 times ');
fnd_message.show ();
--Dictonary Message
FND_MESSAGE.Set_Name('FND','FORM_RECORD_CHANGED');
FND_MESSAGE.Error;
--Debug Messsage
FND_MESSAGE.DEBUG('ERROR');
Validate if the Record entered is a Duplicate Record
1. Create a ON-COMMIT trigger at form level and write below logic based on your
requirement
PROCEDURE on_commit is
CURSOR c_person
is
SELECT rowid row_id,
hdr_id
FROM STAGGING_TBL
WHERE user_name =:BLOCK.user_name

AND nvl(person_id,'-999') = nvl(:BLOCK.person_id,'-999');


BEGIN
--Validate if there is existing record for Oracle user
FOR c_preson_rec IN c_person
LOOP
IF c_preson_rec.row_id <> :BLOCK.row_id
THEN
FND_MESSAGE.Set_STRING('Record exist for this Oracle User');
FND_MESSAGE.show;
Raise FORM_TRIGGER_FAILURE;
END IF;
END LOOP;
END;
Looping logic to perform validations
curr_record := :SYSTEM.CURSOR_RECORD;
curr_item := :SYSTEM.TRIGGER_ITEM;
BEGIN
go_block('BLOCK');
First_Record;
LOOP
IF :BLOCK.PERSON_ID = person_id
AND curr_record <> :SYSTEM.CURSOR_RECORD
AND ( :BLOCK.START_DATE >= start_date OR :BLOCK.end_DATE <= end_date
OR :BLOCK.END_DATE >= start_date OR :BLOCK.end_DATE <= end_date)
THEN
FND_MESSAGE.Set_STRING('Employee has mutliple records with Overlapping Dates');
FND_MESSAGE.show;
Raise FORM_TRIGGER_FAILURE;
END IF;
IF :System.Last_Record = 'TRUE'
THEN
EXIT;
END IF;
END LOOP;

Execute_Query;
Go_Record( curr_record);
go_item(curr_item);
END;
Querying on Non Database fields in Oracle Forms
1. Sample Block : EMPCCLOCOVD

employee_name - Non database field.


employee_number - Non database field.
person_id
- Database, hidden field
2. Add a Pre-Query trigger on the block , where it contains a non database fields for
querying.
3. Sample code for the Pre - Query trigger :
PROCEDURE pre_query IS
l_where
VARCHAR2(250) := 'Where 1 = 1';
BEGIN
l_where := l_where || 'AND person_id IN (SELECT person_id FROM per_all_people_f ppf '
||' WHERE EMPLOYEE_NUMBER like '''||'%'||:EMPCCLOCOVD.EMP_NUM||'%'')'
||' AND FULL_NAME like '''||'%'||:EMPCCLOCOVD.EMP_NAME||'%'')';
SET_BLOCK_PROPERTY('EMPCCLOCOVD',DEFAULT_WHERE,l_where);
END pre_query;
POPULATE WHO COLUMNS in Oracle Forms:
Write the below code in PRE-INSERT, PRE-UPDATE at DATABLOCK LEVEL
FND_STANDARD.SET_WHO;
Datablock Order by Non database Column
I need my header block order by NON DATABASE Column COUNTRY below is the value
that I need to have in ORDER BY Clause of the datablock
(SELECT ftt.territory_short_name from fnd_territories_tl ftt where ftt.TERRITORY_CODE =
country_code)

You might also like