function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Koen (BvD)Koen (BvD) 

Global variables

Koen (BvD)Koen (BvD)

It seems something went wrong in posting.

 

I have been using the global variable Api in s-controls and visual force pages to access the api url and session id. However I would like to use this now in the controller. I have been skimming through most of the help files but must have missed this trivial thing.  What would be the equivalent of

 {!$Api.Partner_Server_URL_160}

in the controller class? I installed eclipse and tried to get autocompletion for :Api, but nothing.

 

If this is not available from the apex code, how would I get round this (i.e. how could I pass the info from the page to the controller)? Can I use nested expressions to pass them in a function call? (but that would require me to pass them each time)

TehNrdTehNrd
I checked the docs and didn't see methods for API URL. I'm guessing the reason for this is what's the point? If you are using apex you can directly access all the data directly with apex code.
Message Edited by TehNrd on 09-16-2009 02:59 PM
Koen (BvD)Koen (BvD)

the point is that I am doing a bidirectional integration with a second website. Previously I would use an s-control with a link to the second website. In that link I would pass url and session id so that the second website can make call back calls to the webservice. Now that s-controls are depreciated, I am trying to move to visual force pages and would like to build the link in the controller, not in the page.

 

It just seems unlogical that the page would see more global variables then does the controller. I think this is a serious inconsistency in the language specs. 

 

Anyway, I found a workaround to get the information to the controller.