Skip to main content

I created a new Custom LU /Custom page in IFS 10. I need to automate the entering Used Id and Enty Date into the same window. Is there any way we can do it? 

I tried to user Custom Event for this, but I could not configure it. Can anyone help me with this if possible? 

 

 

 

My Event Code is as below

 

DECLARE
Date_E_ Date();
User_ID_ VARCHAR2(25);

pragma autonomous_transaction; 

BEGIN

select trunc(SYSDATE)INTO Date_E_,ifsapp.fnd_session_api.Get_Fnd_User INTO User_ID_
from dual;
 
    UPDATE WEEKLY_TIPS_CLT
       SET '&NEW:CF$_DATE' = Date_E_
     WHERE rowkey = (SELECT rowkey
                          FROM WEEKLY_TIPS_CLT
                         WHERE rowkey = '&NEW:ROWKEY');
    UPDATE WEEKLY_TIPS_CLT
       SET '&NEW:CF$_ENTER_BY' = User_ID_ 
     WHERE rowkey = (SELECT rowkey
                          FROM WEEKLY_TIPS_CLT
                         WHERE rowkey = '&NEW:ROWKEY');

END;

 

If you can help me with alternate solution Other than Custom Events, that would also be great. 

 

Thank you. 

Due to limitations of the configuration layer, you cannot preload (default values) the persistent custom fields. Your solution won’t work because Oracle single transaction won’t allow changing the values of the same tuple, hence it’ll raise the ORA table mutating error.

Simply way of doing this is by:

  1. Restricting the users to enter the values to such fields by:
    1. Either making the fields read-only via the table properties
    2. Or by creating an event action against the CLU table and raising an error if those fields are not empty
  2. Creating an IFS background job to feed the values
    1. Create a PLSQL procedure which accepts only one VARCHAR2
    2. Copy your code into that procedure
    3. Use Transaction_SYS.Deferred_Call and call your procedure

Then, your procedure will be executed in a different Oracle transaction, which will change the data of those two fields accordingly. You will be able to check the progress of the background jobs via the IFS>Solution Manager>Background Processing screen.

 


Reply