Solved

Saved query - get UserId / PersonId dynamically

  • 26 July 2021
  • 1 reply
  • 246 views

Userlevel 2
Badge +5

HI all

 

(this is IFS2003 - I know, I know...)

 

I recall someone long ago creating a Saved query that could be shared amongst our users, that looked for (say) Approvals for that user. The dynamic code meant it could be passed around without need to change the Advanced query.

For instance, instead of USERID  = ‘BLOGGSF’,

I thought we could use USERID = (select Ifsapp.fnd_session_api.get_fnd_user()from dual)

but this generates the error “fnd_session_api is not a procedure or is undefined

How can I get this to work, or is there an alternative?

Would be good to do this for PersonId too.

 

 

Thanks

icon

Best answer by Tim Oliver 26 July 2021, 15:41

View original

This topic has been closed for comments

1 reply

Userlevel 2
Badge +5

Funny how you ask a question and then find the answer yourself!

 

For reference - 

 

Person Id from session details is:

&APPOWNER.PERSON_INFO_API.Get_Id_For_User(&APPOWNER.FND_Session_API.Get_Fnd_User)

 

User Id (or identity) is:

&APPOWNER.FND_Session_API.Get_Fnd_User