Monday, 11 November 2013

21. Record History on OAF Page

Sometimes, there is a requirement when a user wants to see data about a particular record, such as who created the record and when, and who most recently updated the record and when (For example, a manager wants to check when and by whom an invoice line was last updated).

This feature can be enabled on OAF page, which adds the record history icon to the component (Header, Table or Advanced Tables). Clicking the icon opens a popup window that displays the WHO column values of the current row.

Note: This feature works only for non-PL/SQL based updateable ViewObjects. Also, to use this feature, profile option 'FND: Record History Enabled' must be set.

Record history information is generally saved in the "WHO columns" of the database tables and are linked to an OAF page through BC4J Entity Objects (EOs). These WHO columns are as follows:
Name of the user who created the row (CREATED_BY)
Date of creation (CREATION_DATE)
Name of user who updated the row (LAST_UPDATED_BY)
Date when row was last updated (LAST_UPDATED).

The Header, Table and Advanced Table components have a property - Record History Enabled which can be set to true or false. We can set this either from JDeveloper or from 'Personalize Page' link from front end as shown below:

Now when we open the page, it will show 'Record History' icon as show below:

On clicking the icon, a popup will open showing WHO column values of the current row:

The Record History window displays the OARecordHistoryRN.xml region. The region also has an associated controller -
When Record History window is called, the root application module of the calling page is retained and then from processRequest() method of OARecordHistoryCO, WHO column values are read from the EnityObject using history methods (like eo.getAttribute("CreatedBy");).

1 comment:

  1. Hello,

    Thanks a lot for sharing this. Now atleast I know that record history is available on OAF pages.
    I did not get 'This feature works only for non-PL/SQL based updateable ViewObjects.'
    I am a Oracle Functional Analyst. I want to see the supplier record history. I want to see this on Suppliers page in Oracle. Does this come under the category mentioned in the above quoted text?