0
<apex:component controller="SF1_UserAgentIdentifyController">
  <h5><div class="alert alert-info" role="alert">{!message}</div></h5>
  <button class="btn btn-lg btn-primary" type="button" onclick="javascript:sforce.one.navigateToURL('/006');">Back</button>

but its not taking me to the default opportunity page which appear in sf1 when we click on opportunity tab.

Mobile UI

And I am having a VF page when back button is located and want to come back on the above screen within the salesforce one.

1

1 Answer 1

0

Try:

<button class="btn btn-lg btn-primary" type="button" onclick="sforce.one.navigateToURL('/006');">Back</button>
5
  • @geekmartian i tried it but not working.
    – vikasgupta
    Dec 8, 2014 at 13:24
  • @vikasgupta works fine for me, the javascript: part in the onclick event was not necessary. Do you see any error on the Javascript console? Dec 8, 2014 at 13:30
  • it shows an error saying that "your page is not optimized for mobile or enable the page for mobile app....."
    – vikasgupta
    Dec 8, 2014 at 18:24
  • Go to Setup/Develop/Pages, select the page where the button is located and check "Available for Salesforce mobile apps" Dec 8, 2014 at 19:06
  • I have edited my question please look in to it.
    – vikasgupta
    Dec 8, 2014 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .