• GGJ5
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I have a very simple VisualForce Page that I've put on my leads layout.  I've checked the "Available for Salesforce mobile apps" checkbox on the VFP.  In salesforce 1 view if I click the link it opens another tab.  Why?  On the tab it opens, just the link is shown not the whole Salesforce page.  If I click the link on the new tab it opens the Sf1_Test2 page as expected.   How can I stop the link from opening another tab?  Clicking the link should open the other page not a tab.

<apex:page standardController="Lead" >
<body>
    <a href="javascript:sforce.one.navigateToURL('/apex/Sf1_Test2');">Salesforce 1 Link</a>
</body>   
</apex:page>
  • September 18, 2014
  • Like
  • 0
I have a very simple VisualForce Page that I've put on my leads layout.  I've checked the "Available for Salesforce mobile apps" checkbox on the VFP.  In salesforce 1 view if I click the link it opens another tab.  Why?  On the tab it opens, just the link is shown not the whole Salesforce page.  If I click the link on the new tab it opens the Sf1_Test2 page as expected.   How can I stop the link from opening another tab?  Clicking the link should open the other page not a tab.

<apex:page standardController="Lead" >
<body>
    <a href="javascript:sforce.one.navigateToURL('/apex/Sf1_Test2');">Salesforce 1 Link</a>
</body>   
</apex:page>
  • September 18, 2014
  • Like
  • 0
Hi Guys,

I am facing a starnge behaviour of inline VisaulForce on my deatil page of contact in Salesforce1.
I have 3 buttons on my visualforce(Nothing else on page), now i have added this visualforce on my contact page layout. This works fine when i run this on web browsers, but when i see it on my mobile device the page looks good but when i click on button the complete visaulforce page gets open again with only this 3 buttons on page and then i can click on those button which redirects me to some othe page.

Is it possible to make those button clickable same at inline visualforce itself(instead of opening same page again).

Below is code of the Page:
<apex:page docType="html-5.0" standardController="Contact" showHeader="false" sidebar="false" standardStylesheets="false">
<script>
function test1(){
    if ( (typeof window.sforce != 'undefined') && (window.sforce!=null) ) {
      sforce.one.navigateToURL('/apex/XXXXX?ConId={!Contact.Id}&retURL=/{!Contact.Id}');
    }
    else {
      alert('Not in SF1 :(');
    }
}
function test2(){

}
function test3(){

}   
</script>
                <apex:form >
                    <apex:commandButton styleClass="sf1button" value="Add" onclick="test1()" />
                    <apex:commandButton styleClass="sf1button" value="New" onclick="test2()"/>
                    <apex:commandButton styleClass="sf1button" onclick="test3()" value="View"/>
                </apex:form>
</apex:page>