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
jha.pk5@cloud.comjha.pk5@cloud.com 

Urgent help

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

 
Shivanath DevnarayananShivanath Devnarayanan

Hi,

 

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)
else
alert("couldn't find it") 
}
</script>

  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.