Skip to main content

I am adding a group to a page and I want the group label to have the currently signed in User’s ID, how can I accomplish this? (ideally through Developer Studio)

@jamie.malangyaon please use getter function fnd_session_api.get_fnd_user.


Hi ​@Abdul, do you have an example of how to use it in the projection and/or client files in developer studio?


@jamie.malangyaon, sorry I dont have any examples currently though it is simple. Please refer below plsql block example.

 

BEGIN

   INSERT INTO user_audit_log (

      table_name, record_key, action_type, modified_by, modified_on

   ) VALUES (

      'CUSTOM_ORDER_TAB', :new.order_id, 'UPDATE', fnd_session_api.get_fnd_user, SYSDATE

   );

 

END;


Hi ​@Abdul thanks for this - however, I am looking for an example or instructions on how to apply that function to a to a projection and/or client so it is displayed on a button or group element.

For example if I have to expose it to the page’s projection then what does that look like or what does the syntax look like in the client file if I only need to add it there?


Hi ​@jamie.malangyaon ,

You can change .client and .projection files like below.

E.g:-

.client

@Override
group PricingGroup for SalesPart {
   field CUser {
      label = "User";
   }
}

.projection

@Override
entity SalesPart {
   attribute CUser Text {
      fetch = "Fnd_Session_API.Get_Fnd_User";
      editable = false];
   }

}

 


@asanka1055 This is exactly what I was looking for! Thank you!


Reply