Skip to main content
Solved

How can I dynamically get the user id to show in a group label?

  • July 23, 2025
  • 6 replies
  • 107 views

Forum|alt.badge.img+12

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)

Best answer by asanka1055

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];
   }

}

 

6 replies

Abdul
Superhero (Partner)
Forum|alt.badge.img+20
  • Superhero (Partner)
  • July 23, 2025

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


Forum|alt.badge.img+12

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


Abdul
Superhero (Partner)
Forum|alt.badge.img+20
  • Superhero (Partner)
  • July 23, 2025

@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;


Forum|alt.badge.img+12

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?


asanka1055
Hero (Partner)
Forum|alt.badge.img+9
  • Hero (Partner)
  • Answer
  • July 24, 2025

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];
   }

}

 


Forum|alt.badge.img+12

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