You need to sign in to do that
Don't have an account?
Terry411
Page Navigation Salesforce1 verse Desktop
I'm working on a proof of concept that will allow us to run Reporting Services reports via a SF Action. The SF1 users will be connected via Good and running within the firewall. So connectivity will not be a problem.
What I'm fighting is getting the links on my VF page to know if I'm running within SF1 or running from my Desktop browser. When I run the code below, both the desktop and SF1 show the alert 'hello mobile'. How do I get this to work from the Desktop? The mobile link works perfectly.
What I'm fighting is getting the links on my VF page to know if I'm running within SF1 or running from my Desktop browser. When I run the code below, both the desktop and SF1 show the alert 'hello mobile'. How do I get this to work from the Desktop? The mobile link works perfectly.
<script> function openTab(recid, recname) { var url = "http://crastrsrpt01.us.xxxxxx.com/ReportServer/Pages/ReportViewer.aspx?" url = url + "%2fProduction%2fTRSSales%2fProducer+Profile" url = url + "&contact=" + recid url = url + "&rs:Format=PDF" if((typeof sforce == 'undefined') || (sforce == null)) { // Desktop navigation alert('hello desktop - ' + sforce); window.location.href = url; } else { // Salesforce1 navigation alert('hello mobile - ' + sforce); sforce.one.navigateToURL(url); } } </script>
Best Answer chosen by Terry411
Terry411
Not sure what I was donig wrong but I have this working now.