0

I’ve created several visualforce pages that are Available for Salesforce mobile apps. The home page contains buttons which link to the other visualforce pages I created. When I log into Salesforce1 the home page displays as mobile; however, whenever I click on the buttons the next visualforce page displays desktop. I would like for the pages to display in mobile if I am logged into Salesforce1. I've tried different ways as you can see in the code below, please help. Thanks!

<apex:page >
<FORM>
<INPUT TYPE="BUTTON" VALUE="Search Patient/Guest" onClick="self.location.href=  ('https://na17.salesforce.com/_ui/search/ui/UnifiedSearchResults')" 
 style=" background-color:#af0400; width: 330px; font-size: 22px; font-weight: bold; color: #ffffff;" /><br />
<INPUT TYPE="BUTTON" VALUE="New Patient" onClick="parent.location='https://na17.salesforce.com/apex/Naperville_New_Pt_Page'"
style=" background-color:#af0400; width: 330px; font-size: 22px; font-weight: bold; color: #ffffff;" /><br />
<INPUT TYPE="BUTTON" VALUE="New Guest" onClick="self.location.href=('Naperville_New_Gt_Page')" 
 style=" background-color:#af0400; width: 330px; font-size: 22px; font-weight: bold; color: #ffffff;" /><br />
<INPUT TYPE="BUTTON" VALUE="New Relationship" onClick="self.location.href=('Naperville_Relationship')" 
 style=" background-color:#af0400; width: 330px; font-size: 22px; font-weight: bold; color: #ffffff;" /><br />
<INPUT TYPE="BUTTON" VALUE="New Visit" onClick="self.location.href=('Naperville_Visit_Page')" 
 style=" background-color:#af0400; width: 330px; font-size: 22px; font-weight: bold; color: #ffffff;" />
</FORM><!--to allow code formatting-->
</apex:page>
0

Does this still happen if you use the $Page action to build the link to the VisualForce page?

Example

<apex:outputLink value="{!$Page.Naperville_New_Pt_Page}">Link Text</apex:outputLink>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.