Solved

Custom Menu to open form in a non-default company

  • 23 November 2021
  • 8 replies
  • 379 views

Userlevel 5
Badge +9

Hi,

I have created a very simple custom menu to open the form Expense Sheet from an other screen.

Expense Sheet view is company specific and my default company is RIA.

If i try to open through this menu a record that belongs to XYZ company, it will open Expense Sheet in RIA and no record will be be displayed.

I have, of course, access to XYZ, so how to force IFS to switch to the company XYZ when opening Expense Sheet view?

 

 

thanks !

icon

Best answer by eqbstal 12 December 2021, 21:04

View original

This topic has been closed for comments

8 replies

Userlevel 7
Badge +21

Hi,

When I open the Expense Sheet form and look at the system information, it shows the following in my IFS10 Upd 11 environment:

So the COMPANY_ID is filled with a user global value. Most likely you will have to make a change of this global value before you open the window. That would mean a Custom Menu which handles the setting of the global value and next opening form frmTabExpenseHead.

I've not accompliced it but maybe you are able to prepare an URL custom menu that would open the IFS IEE link: ifsapf:frmTabExpenseHead?COMPANY=CF$_COMPANY_ID

This will be by the way an issue when upgrading to Aurena, as you will have to modify the URL.

Hope you can make it work.

Userlevel 5
Badge +9

Hi, thanks for this interesting suggestion, and indeed it works if i open this URL: ifsapf:frmTabExpenseHead?COMPANY=&CF$_COMPANY_ID however i am not able to pass the ID in my 2nd screen EXPENSE_ID.

I tried ifsapf:frmTabExpenseHead?COMPANY=&CF$_COMPANY_ID&&EXPENSE_ID=&CF$_EXPENSE_ID, but it does not filter the expense ID ...

Userlevel 7
Badge +21

That is a pity.

What if you pass the url as:

ifsapf:frmTabExpenseHead?COMPANY=&CF$_COMPANY_ID&ACTION=querydialog

It is not all that nice as the last query is shown, but it might help the user to get to the result a bit faster.

Userlevel 5
Badge +9

Thanks, and if using this option, is it possible to pass a parameter in the querydialog (=pre-fill the expense ID)?

Userlevel 7
Badge +21

Ah, sorry had to mention that in my previous reply.

No, I didn't get to work.

Kind regards,
Steve

Userlevel 7
Badge +21

Hi,

I came across another link

In the last image, notice the URL used:

So it uses ?external_search=

Might that help?

Steve

Userlevel 5
Badge +9

In order to complete this last suggestion for which I am very thankful:

You must put variable in between { } such as:

ifsapf:frmTabExpenseHead?COMPANY=&CF$_COMPANY_ID&external_search=EXPENSE_ID%3d{&CF$_EXPENSE_ID}

NB: = --> %3d

 

Userlevel 7
Badge +21

Well done ludovic.rougean. Thanks for include the end solution.