A time honored tradition for writers of all ilk is to use a “<Insert arbitrary number> things about ..” schtick for framing a topic. I’m not one to look a schtick-horse in the mouth and so in honor of the recent release of the Salesforce1 platform and app, here is my list of 6 (my arbitrary number of choice) things you should know about Salesforce1. I’ve limited myself to things that would be of special interest to developers looking to customize the Salesforce1 app and so here goes.

  1. Two flavors of the Salesforce1 app – You probably already know that iOS and Android versions of the Salesforce1 app are available for download on the App Store and Google Play. However, Salesforce1 is also available as a web only app that can accessed via any browser. Simply log into any Salesforce1 enabled Org and then append /one/one.app to your instance URL (e.g. https://na12.salesforce.com/one/one.app) in order to access the web version of Salesforce1. The web/HTML5 version is especially handy for developers looking to debug any Visualforce pages that are surfaced inside Salesforce1 since you can use web debugging tools like Firebug or Chrome Developer Tools. Note that while the web version of Salesforce1 is identical to the iOS/Android versions in most ways, there are a couple of differences to note. For example, the ‘Today’ feature integrates with the user’s device calendar and is therefore only available in the iOS/Android versions of Salesforce1. Similarly, push notifications only work in the iOS/Android versions.

 

  1. Enable Publisher Actions in Salesforce1 - One of the most powerful features in Salesforce1 is the ability to add and configure custom Publisher Actions (accessed via the + sign in the app). Publisher Actions can be used to create or update a record via point-and-click, point to a Visualforce page or render a Canvas app (i.e. hosted outside of Force.com). However the one thing that all Publisher Actions have in common is that they have to be enabled before they appear in the Salesforce1 app! In organizations created after the Winter ’14 release, Publisher Actions are enabled automatically and so no further action is required. However, for older Orgs you’ll need to explicitly enable Publisher Actions via SetupCustomize | Chatter | Settings | Enable Publisher Actions.

 

  1. Configuring ‘Smart Search Items’ : If you’ve logged into Salesforce1, you’ve probably noticed the ‘Recent’ section in the Left Navigation Menu. This section lists the recently searched-for objects for a particular user (i.e. it’s user specific). Only searches done in the full Salesforce site influence the order of objects in this section. This section is the quickest way for a user to navigate to a particular object (e.g. Accounts, Cases etc.) in Salesforce1 and so there is a good chance that you’ll always want to see some object at the top of that section, independent of your search history. You can do so by ‘pinning’ objects on the Search Results screen in the full Salesforce site (see accompanying screenshot). Each object that you pin there will be pushed to the top of the ‘Recent’ section in the Salesforce1 app making for easier user navigation.

 

  1. Enable Visualforce to appear in Salesforce1: For developers, Visualforce offers a powerful way of customizing the Salesforce1 app. You can surface Visualforce pages in the Left Navigation Menu as a Custom Tab, associate it with a Publisher Action or add it to a record home page as a Mobile Card. However, in order to add any Visualforce page to Salesforce1 you have to first mark it as being mobile ready. We require developers to take this explicit step because Salesforce1 cannot magically make an existing Visualforce page “mobile ready”. Developers have to consciously design their Visualforce pages for a mobile-first UI using techniques like responsive design or the Mobile Design Templates to account for the limited screen size in Salesforce1. You can mark Visualforce pages as being mobile ready by going to Develop | Pages | <Your page> | Edit and checking the ‘Available for Salesforce mobile apps’ checkbox.
    Note: Contrary to popular belief, the ‘Mobile Ready’ checkbox on a Visualforce Custom Tab has no effect when it comes to adding Visualforce pages to the Left Navigation Menu in Salesforce1.

 

  1. Custom navigation via JavaScript: One of the lesser known developer features in Salesforce1 is the ability to navigate users to different places in the app via JavaScript in your Visualforce page. You could for example have a Visualforce page with a ‘New’ button that has the following onClick code.
    function createNew() {
          sforce.one.createRecord("My_Custom_Object__c");
    }

    Clicking the New button will then automatically display the default create/edit page for My_Custom_Object__c inside of Salesforce1. The magical sforce.one object contains a bunch of such navigation utility functions, including the ability to navigate to a record detail view, a user or record feed, an arbitrary URL and more.

 

  1. Logging into a Sandbox Org using Salesforce1 : I lost count of how many people asked me this question at Dreamforce. By default, the Salesforce1 app that you download from the App Store or Google Play is configured to point to login.salesforce.com. You can instead login to a Sandbox Org by first logging out of your production Org in Salesforce1 and then clicking on the top-right gear icon on the login page.

 

Hopefully you found some nuggets of wisdom/help in this list. We’ll be blogging throughout the month of December about the various features of Salesforce1 and so watch this space for a deeper dive into some of the things that I’ve touched on in this post. Till then, as always, questions and comments are welcome.

tagged , Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • shoby abdi

    Excellent post! Did not know about the /one/one.app url workaround, amazing!

    • Peter Knolle

      It is very useful with the Chrome Developer Console. You can go into Settings | Overrides and Override the User Agent and Device metrics to emulate various mobile devices with ease. You can also emulate touch.

  • Havs

    Have you seen any issues with logging into a Sandbox where you continue to get a “Please enter your User Name”. I try to login and I keep getting that error, yet when I login to production it works just fine.

    • bhanots

      I haven’t seen that issue before. Assuming that you’ve checked for typos etc, I would file a support case to see if they can recreate the issue and address it.

    • Gold

      I have been facing this issue for a long time. Any solutions yet?

    • Gold

      Figured out that Salesforce1 supports android 4.2 and above, mine is 4.1. I think this may be the reason.

  • Revanth Kumar Ravikanti

    Hi SANDEEP,

    This post is very help full for me as i was trying to operate the salesforce one in mobile and you know our 2g net and i could not see all the features on the mobile.

    In which book of salesfore we get some of this javascripts which you have explained?

    Thanks you very much Sandeep for this tips.

    • bhanots

      Hi Revanth – Josh already beat me to it. Please check out the link that he posted and let us know if you have have other questions.

  • Josh Birk

    Revanth Kumar Ravikanti – you might check this link for more info on some of the JS included with S1:

    http://docs.developer.salesforce.com/docs/atlas.en-us.186.0.salesforce1.meta/salesforce1/vf_dev_best_practices_navigation.htm

  • Hamayoun Khan

    Great post! Couple more things which may be useful, which I found out the hard way :-)

    For item 2, you need to edit the Global Publisher Layout to automatically add New Case, New Contact, New Opportunity, etc, actions. The pages are there, but need to be dragged into the layout.

    For item 4, if you are overriding a View or Edit page with VisualForce, the VF page will automatically be navigated to if you check the ‘Available for Salesforce mobile apps’ checkbox. If you don’t check it, then the default behavior (View/Edit) will happen.

    • bhanots

      Great tips! Thanks for sharing…

  • sandeep

    Really Very helpful stuff you release Thanks sandeep

  • Ravichandra Satti

    Hi SANDEEP BHANOT,

    One thing I’m not sure about is how to add custom publisher actions to the “+” button on a Visualforce page used in Salesforce 1. Any idea on this?

    Thanks,
    Ravi

    • bhanots

      Good question Ravi. Unfortunately, custom publisher actions are not currently supported on Visualforce pages that are exposed via the Left Navigation Menu. You therefore won’t see the ‘+’ button on the VF page. On the roadmap though…

      • http://www.tgerm.com/ Abhinav Gupta

        Wow ! This is good to know @bhanots:disqus, getting ‘+’ on visualforce pages will be a great value add. Looking forward to it !

  • http://www.tgerm.com/ Abhinav Gupta

    Great post @bhanots:disqus ! Using /one/one.app clears my debugging fears with mobile web.

  • BAH

    Question regarding customizing Salesforce1. On my contact record detail page, the upper section of the display can be controlled by the Compact Layout. I get that with no problem. But I dont know how to control the narrow section right below that. Its sits just below the top section and above the detail section. On my contact record, this section contains 2 icons (one is an Email icon, and the other brings up google? maps). Similarly on the Account record detail page, there are 3 icons, google? maps, google? search, and a ‘link’ icon that doesnt work. However, the leads and opportunity record contain no such section.

  • Satyananda Yeluri

    Nice Post…

  • atn77

    What’s the benefit of a salesforce one “app” vs a native ios / android app with api connections to salesforce?

    • http://www.forcementor.com/ Don Robins

      The only ‘benefit’ of accessing the SF1 app as strictly a mobile web app on a device is that you don’t need to download the host native App. BUT in doing so, you will lose the persistence of your login, which means any time you navigate away from the mobile page or put it in the background, you’ll be forced to login again. you also will not be able to access anything specific to the mobile device available only through a native hybrid shell, (which is really what the SF1 App is acting as.) Later that will likely include secure offline data persistence. However, in a desktop browser, the benefits are greater in that you can emulate the mobile experience as you design and develop your app for mobile delivery, and you can leverage built in developer tools in desktop browser and other tooling to debug and test.

  • Rishabh

    On Visualforce page the Lookup is not working on Salesforce1 Mobile App

  • Sumit

    Hi, I am new to Salesforce and Salesforce1. So my question might seem silly. Do we need to buy separate Licenses to use salesforce 1 app or any EE edition user can use Salesforce1 using same license.

  • Sumit

    Also, Is there any limitation to salesforce1 app? If i have developed a force.com app with lots of custom objects, and VF pages…will I be able to see everything in salesforce 1 app? What are the limitation of salesforce1 app? Does it allow all standard+custom objects? Does it put any kind of restriction on VF pages? Does it allow all workflow, validation rules and approval processes?

    • Alan Davies

      I think you can rely on all the server-side stuff (validation rules, workflows, triggers, approvals, etc.), especially because a lot of that functionality is there to ensure data integrity. If you app has a lot of browser-based stuff (e.g. Javascript), that’s when things can get a bit unreliable…

  • Hamayoun Khan

    Hi Sandeep

    After using one.app in Chrome for a while, I have come across a slight difference in the left vertical navigation bar between one.app and the actual iPad app. It seems to happen in one very specific case (I can supply details if you want me to), but it makes me think that one.app is not 100% reliable for testing. Maybe 90%, but not 100%. Your thoughts?

    Thx,
    Hamayoun

  • KK

    Is it possible to render an Adobe Flex page within Salesforce1? looks like it is not supported. Any suggestions?

  • Alan Davies

    In Salesforce1, I can’t add a related list record (e.g. add a new Contact to an Account) – is this by design, or is this an option that can be enabled?