Skip to main content

Hi!

We want to show which user has executed the transport task in entity TransportTask. I know I could enable history log for the LU, but this is not searchable.

My thesis is to add a persistent custom field on the entity that can be filled with Fnd_Session_API.Get_Fnd_User() through a custom event, and fire when user is executing the transport task (when object PRINTED_FLAG is changed from 0 to 1). 

However, I keep getting error messages when pressing Execute, especially ORA-01008: not all variables bound.

Is my thesis even doable? If so, can anyone help me? If not, does anyone know what else I could to to achieve this?

Best regards, 

Henning

@henros Your approach is possible, but custom events are going away at some point (I think IFS would push you to use workflows...).
Can you provide your event action code?
My guess is that you have a `:` instead of a `&` for one of your used trigger attributes.


@henros Your approach is possible, but custom events are going away at some point (I think IFS would push you to use workflows...).
Can you provide your event action code?
My guess is that you have a `:` instead of a `&` for one of your used trigger attributes.

First I have created a CF in TransportTask called CF_EXECUTED_BY. As a persistent field, string unformatted, insertable, updateable, searchable, enabled on reports, public.

 

Then I created a custom event against Entity TransportTask and table TRANSPORT_TASK_TAB (the custom field is not in this table). Then “Objects are changed” is on with only PRINTED_FLAG:

No custom attributes added here.

Then, the event action as follows:

 

SQL Statement:

DECLARE
  objid_       VARCHAR2(2000);
  objversion_  VARCHAR2(2000);
  attr_        VARCHAR2(32000);
  info_        VARCHAR2(32000);
BEGIN
  SELECT objid, objversion
    INTO objid_, objversion_
    FROM transport_task
   WHERE rowkey = :NEW_ROWKEY;

  Client_SYS.Clear_Attr(attr_);
  Client_SYS.Add_To_Attr('CFS_CF_EXECUTED_BY', Fnd_Session_API.Get_Fnd_User(), attr_);

  Transport_Task_API.Modify__(info_, objid_, objversion_, attr_, 'DO');
END;

 

When pressing execute on the Transport Task, the following error message shows:

The Event Action "Execute Online SQL" on "NAM_TT_USER" has failed. Please contact your System Administrator to manage the Event Actions. ORA-01008: not all variables bound

 

BR, 

Henning


@henros thanks the breakdown

As I thought, you do have a mistake in the way you are referring to `NEW_ROWKEY`

-Once you get past that error the next you’ll hit is the attribute rowkey isn’t available in a view.
-Once you get past that error the next you’ll hit is how you are referring to your custom field. (Check the definition in the database not API explorer for this type...which is part of why these are going away)
 -Once you get past that error the next one you’re going to hit is the method you are calling to update a custom field. There should be a specific method for updating configured field
-Once you’re past those errors, you’ll probably get a mutation error as well.


I would reexamine your approach


@henros thanks the breakdown

As I thought, you do have a mistake in the way you are referring to `NEW_ROWKEY`

-Once you get past that error the next you’ll hit is the attribute rowkey isn’t available in a view.
-Once you get past that error the next you’ll hit is how you are referring to your custom field. (Check the definition in the database not API explorer for this type...which is part of why these are going away)
 -Once you get past that error the next one you’re going to hit is the method you are calling to update a custom field. There should be a specific method for updating configured field
-Once you’re past those errors, you’ll probably get a mutation error as well.


I would reexamine your approach

You are right. Do you have any suggestions to what could ve an alternative to this approach? BPA? 


yes, I think workflows is where IFS is pushing people. They will have their own learning curves and headaches too. There are also things like boomi that offer a more drag and drop experience for ‘customizing’ you solution (i’ve never used them but for sure will be more user friendly than workflows).

It may be a good practice to try to fix the issues in the current one you’re working on, if for nothing else, you will get more acquainted to the technical documentation and pl/sql.

 

You aren’t far off, and I’ve provided enough buzz words for your specific errors that you are likely hit.
Hitting all the Error Messages will help in understanding them and when and why they happen