+ Start a Discussion

Urgent help

How can we  get the current application name in vf page using controller

Shivanath DevnarayananShivanath Devnarayanan



I was not sure too about this so i Googled a little bit on your behalf, and seems like there is no way around it .. may be you should follow these posts 


Through APEX code, you can get the Tab names etc , but if The WEB API provides the method to detect the Application Name .. 



Related Salesforce Forum Post


Do post back if you get a solution for it .. happy Coding

Noam DganiNoam Dgani

assuming you not hiding the header in your vf page, you can put the following in your vf page:



<script type="text/javascript">
function showAppInAlert(){
var myTextField = document.getElementById('tsidLabel');
if(myTextField.value != "")
alert("The selected app is " + myTextField.innerHTML)
alert("couldn't find it") 

  i put the selected app in an alert, but once you have the value you can do whatever you want with it,

additionally, you can call the method whenever it suites you (on load?)


hope it helps.