call functions between solutions

I want to click a button in the solution A and open the solution B calling the B method globals.B_method with parameters.

I read the documentation of application.closeSolution but the method seem running from the solution A. However if I try to use it so, it seems not work.

Parameters
solution_to_load - the specified solution to load when the currently active
solution is closed; optional.
method - the specified method run from the currently active solution; optional.
argument - the argument for the specified method; optional.

To open a solution you can use

application.showURL("http://<server_ip>:<port>/servoy-client/servoy_client/<solutionB_name>.jnlp?method=<method_name>&argument=<arg>");

After that, you can close solution A using application.closeSolution() if you want

Are there other solutions? This is not so pretty…

It depends, why exactly do you want to open solutionB and not just handle everything in solutionA? (or add solutionB as a module to A and just run the method)

Because the two solution are yes related but are very big and I prefer maintain distincts. Otherwise I can import B as a A module but I don’t know how many overhead this can cause.

I think that the best option is to put all the functionality that is used in both A and B in a third solution, C, and add that as a module to A and B.

Solved here