+ Start a Discussion

commandbutton for salesforce1

I currently have a visualforce page with a button to create a new record.  The button works fine but when i click on the button in salesforce1 it goes out of the app and tries to open in the browser.  How can i get the link to open in salesforce1

here is the code that i have 

 <apex:pageblockSectionItem datastyle="Width:10%" labelStyle="Width:23%">
      <apex:commandButton value="Transfer Request" action="{!URLFOR('/a10/e?RecordType=012a0000001NWwn&ent=01Ia0000002Kw9e')}" style="height:35px;width:500px; background:Lightblue; font-size:16pt;"/>
Andy BoettcherAndy Boettcher
Salesforce1 has a different URL structure than the desktop/Aloha application.

Instead of using a URL hack masked within a commandButton - you should look at using Chatter Publisher Actions.  The approach you have above will also be rendered useless when Lightning Experience is enabled.