Source1
Source 2
DB TEXT item should be hidden - canvas null
Create a dummy TEXT item for the KFF display
Non DB item
LOV 'ENABLE_LIST_LAMP' with "valiate from list" as no
WHEN-NEW-FORM-INSTANCE trigger.
Initialize KFF using fnd_key_flex.define(
select to_char(id_flex_num)
from fnd_id_flex_structures
where id_flex_structure_code = 'ACCOUNTING_FLEXFIELD'
and id_flex_code = 'GL#';
Then, all that is left to do is to program a few events:
WHEN-VALIDATE-ITEM
WHEN-NEW-ITEM-INSTANCE
POST-QUERY
PRE-QUERY
KEY-LISTVAL
We always try to put this code in the form level triggers
as it is more convenient and consistent than doing it at block or item level,
especially when you have more than one foreign key flexfield in the form.
Only in the case of very large and complicated forms would we do otherwise.
WHEN-VALIDATE-ITEM
if ( :system.mode = 'NORMAL' ) then
fnd_flex.event( 'WHEN-VALIDATE-ITEM' );
end if;
WHEN-NEW-ITEM-INSTANCE
app_standard.event('WHEN-NEW-ITEM-INSTANCE');
fnd_flex.event('WHEN-NEW-ITEM-INSTANCE' );
POST-QUERY
--Loads the flexfields (in our case, it populates
--the concatenated field on execute query).
FND_FLEX.EVENT('POST-QUERY');
PRE-QUERY
--If you don't do this, whatever query criteria you may enter in
-- the concatenated flex field, it is not taken into account.
FND_FLEX.EVENT('PRE-QUERY' );
KEY-LISTVAL
APP_STANDARD.EVENT('KEY-LISTVAL');
FND_FLEX.EVENT('KEY-LISTVAL' );
Source 2
DB TEXT item should be hidden - canvas null
Create a dummy TEXT item for the KFF display
Non DB item
LOV 'ENABLE_LIST_LAMP' with "valiate from list" as no
WHEN-NEW-FORM-INSTANCE trigger.
Initialize KFF using fnd_key_flex.define(
select to_char(id_flex_num)
from fnd_id_flex_structures
where id_flex_structure_code = 'ACCOUNTING_FLEXFIELD'
and id_flex_code = 'GL#';
Then, all that is left to do is to program a few events:
WHEN-VALIDATE-ITEM
WHEN-NEW-ITEM-INSTANCE
POST-QUERY
PRE-QUERY
KEY-LISTVAL
We always try to put this code in the form level triggers
as it is more convenient and consistent than doing it at block or item level,
especially when you have more than one foreign key flexfield in the form.
Only in the case of very large and complicated forms would we do otherwise.
WHEN-VALIDATE-ITEM
if ( :system.mode = 'NORMAL' ) then
fnd_flex.event( 'WHEN-VALIDATE-ITEM' );
end if;
WHEN-NEW-ITEM-INSTANCE
app_standard.event('WHEN-NEW-ITEM-INSTANCE');
fnd_flex.event('WHEN-NEW-ITEM-INSTANCE' );
POST-QUERY
--Loads the flexfields (in our case, it populates
--the concatenated field on execute query).
FND_FLEX.EVENT('POST-QUERY');
PRE-QUERY
--If you don't do this, whatever query criteria you may enter in
-- the concatenated flex field, it is not taken into account.
FND_FLEX.EVENT('PRE-QUERY' );
KEY-LISTVAL
APP_STANDARD.EVENT('KEY-LISTVAL');
FND_FLEX.EVENT('KEY-LISTVAL' );
No comments:
Post a Comment