Question

Quick report in custom menu - a lof of companies

  • 28 February 2024
  • 4 replies
  • 46 views

Userlevel 2
Badge +6

Hi, 

I have a lof of companies in one installation and I’m looking to solution for my problem.

I created custom menu on a frame which start quick report. And the question is: It is possible that in the company_id parameter aytomatically includes the company which I’m logged in.


4 replies

Userlevel 6
Badge +19

Hello @PaulinaPi 

You need to combine report with user_finance view. In where clause you can add following syntax. This will only show result for the companies connected to user who is running the report

WHERE COMPANY IN (SELECT COMPANY FROM USER_FINANCE WHERE USERID = IFSAPP.FND_SESSION_API.GET_FND_USER())

Hope this helps

 

Userlevel 2
Badge +6

Thanks a lof but i need to show only for this one which I’m logged in.

Userlevel 6
Badge +19

Hello again

I got your question wrongly. Global company parameter is set on the instance (application level), you won’t have that information in DB. Therefore I don’t think that you could have as a parameter in the query of the report. 

I am not aware of any function to pass the global company value to a quick report. May be @dsj can comment as he is technical expert.

Hope this helps

Userlevel 7
Badge +20

Hi @PaulinaPi  @gumabs 

 

You can use USER_FINANCE_API.GET_DEFAULT_COMPANY_FUNC() to get the default company of the logged in user. Similarly, you can get the user default site by USER_ALLOWED_SITE_API.GET_DEFAULT_SITE() 

 

Hope it helps!

Damith

 

Reply