Consultium's Blog

All things technical for Oracle Applications

A problem with context sensitive DFFs

leave a comment »

One of the problems with context sensitive descriptive flexfields (DFFs) is that according to the Oracle documentation, the field that is used for the context must be in the same block. I ran in to this problem when my client wanted to setup the Approved Supplier List (ASL) and they wanted to have different additional fields in the Supplier block for the COMMODITY type and the ITEM type, where the context sensive field is in the Items block:Approved Supplier List

There shouldn’t really be a problem with the context itself, as it is effectively a header field (ASL_ITEMS.<field>) which would be the same for all fields on the lines block (ASL_SUPPLIERS.<field>) allowing the context to be consistent and reliable.

So we need to be able to access the constant header value in the DFF setup to set the context. For this we will need to use a forms GLOBAL variable to hold the value; this is accessible from the DFF setup, and can be set via forms personalization.

First we need a forms personalization that will save the value to a global variable when the user enters the supplier block.

Forms personalization 1

This will trigger the saving of the context when the user enters the ASL_SUPPLIERS block

Forms Personalization - Action

This will save the value into the global variable GV_ITEM_COMMODITY, which is created at runtime.

Now we need to setup the DFF to use the newly created global variable GLOBAL.GV_ITEM_COMMODITY:

DFF Setup

Note that to make it work we need to Synchronize the context field with the reference field, also note that the reference field does NOT have the normal colon preceding the name.

Next Freeze the flexfield definition, and compile it.

Now to test the COMMODITY type:

Test of DFF for Commodity Type

And the Item Type:

Test for DFF for Item Type

Advertisement

Written by Andy Noble

June 1, 2009 at 4:37 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.