+ Start a Discussion
jha.pk5@cloud.comjha.pk5@cloud.com 

Can someone help me to find it.

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

Best Answer chosen by Admin (Salesforce Developers) 
no softwareno software

Thanks for quick reply @Sven

All Answers

SvenSven

Hi 

 

i don't know if its possible with apex code

but you could do it with just normal javascript code inside the vf page and check the getElementById of the menu item

 

<script>
alert(document.getElementById("tsidLabel").innerText);
</script>

 

no softwareno software

This script is giving the alert for current app name but if I am passing  to controller using apex action function then I am getting null . Can any one help me?

SvenSven

Hi 

 

there is a nice example of how to pass javascript variables to your apex controller 

 

from wes:

http://th3silverlining.com/2009/09/14/passing-javascript-values-to-apex-code/

 

 

no softwareno software

Thanks for quick reply @Sven

This was selected as the best answer