You need to sign in to do that
Don't have an account?
Naresh Krishna.ax1176
How to get the OS name in salesforce apex ?
Hi All,
We can login to salesforce from any OS like Windows, IMac, Android, etc.
I need to do some specific task based on the logged in user's OS.
Can any one please help me with this.
Thanks.
Hello, Naresh,
I believe what you're trying to do is called "browser detection". A quick search on Google can get you started: http://google.com/search?q=browser+detection
Alternatively you can try searching for "browser os detection". I can't recommend any specific scripts or libraries, so I'll let you look around and try some options to see what you like. Good luck!
ApexPages.currentPage().getHeaders().get('User-Agent')
Not 100% reliable, though (depends on what the browser is willing to submit to the server about your experience). You may also have additional headers available from mobile devices.
Try using the following page for diagnostics: