Somewhere kind of hidden in one of the corners of Salesforce1 is the feature called FlexiPages.Probably not many people might have discovered this yet, but you can’t configure this with point-and-click within salesforce at this time, thus it is out of reach of most administrators.A developer, on the other hand, may not find it sexy enough to investigate.
In this article I want to share my thoughts on the possibilties of FlexiPages and prove that it’s not difficult at all to build these flexipages, even for an admin.
How Salesforce1 presents data by default
Currently… in Salesforce1, out of the box, quite a few people have issues with how data is organized.
For example, when you have the “Accounts” page, people will only see the listviews they recently visited and the Accounts they recently visited. There is a small “trick” that you can search on the name of a listview and then your user will also find the view they need.
On one hand I also see the usefulness of focusing more on search and “recent” views/items in the mobile context. You don’t really want to be scrolling through long lists of hundreds of items. However, there are also many scenario’s where you just want to give users an easy way to access certain listviews.
This is where flexipages comes into the picture.
Organizing data in Salesforce1 with FlexiPages
On a flexipage, you can basically add 2 types of components. You have a “listview” component and a “recent items” component.
On a flexipage, you can add a total of 25 components (mix of listview and recent item components).
Note that you can mix and match objects from different types here! So you could (for example) easily build a page that shows you a listview of “Today’s New leads”, a listview of “My Follow-Up Opportunities”, a recent items component showing all recently visited leads & opportunities etc.
So many imaginable scenarios, so many nice pages for you to build!
Also note that you can decide which publisher actions can be used from your flexipage.
The fields shown in your listviews are the first 6 columns of your listview.
More control over your navigation
Another thing with Salesforce1 is how you arrange the navigation for your users. The order in which objects apear in your menu is based on the “Smart Search Items”.
This will basically give you the set of “recently-searched objects”. Meaning that your menu will be changing continuously as your users work more with (for example) campaigns or more with opportunities.
Again, also for this, I can understand the reasoning, but for users this can be confusing and often they prefer specifying how they want to see their data organised and they always expect it to show in the same manner. You can already choose which items appear on top by “pinning” objects in the search results page. But still, you can’t control which objects show up or not. The pinning is also user-based so if you were to want the same view for all users, each user would have to do the pinning.
FlexiPages can also be the solution for this issue.
Imagine that your users only need to have Accounts, Leads and Opportunities in the menu. You basically create a FlexiPage first for each object. On the Flexipages, you decided which listviews / recent items should show up. Then, for each page, you create a “Flexible Page Tab”.
In the mobile navigation, you then just remove the “Smart Search Items” and add your Flexible Page Tabs. Now you have full control over which objects appear in the menu, in which order, with the list views you want to give to your users!
But there’s no Flexipage entry in the menu!
Ok, so it’s true, there is no graphical page-builder, as you would have with the regular page layout editor. However, you don’t need any real developer tools or skills and most of the work you can just copy-paste from the Salesforce documentation.
Just create a folder on your drive with the name you want to give to your flexipage.
In that folder, create another folder called “flexipages”.
Then, in the flexipages folder, create a file called <your_flexipage_name_here>.flexipage . (make sure the extension of the file is “.flexipage”)
In your main folder, now also create a file called “package.xml”.
See this link for details on how to create the flexipage itself.
And here is more information on creating a flexipage.
I do want to give a short explanation on the 2 available components:
123456789101112131415161718192021 | <!— Listview component –><componentInstances><componentInstanceProperties><name>entityName</name><value>Here you put the name of your object, for example Account</value></componentInstanceProperties><componentInstanceProperties><name>filterName</name><value>Here you put the name of your list view</value></componentInstanceProperties><componentName>flexipage:filterListCard</componentName></componentInstances><!— Recent items component –><componentInstances><componentInstanceProperties><name>entityNames</name><value>Here you put the name of your object(s). If you want to show recent items of multiple objects, separate by comma</value></componentInstanceProperties><componentName>flexipage:recentItems</componentName></componentInstances> |
view rawFlexipages.cls hosted with by GitHub
Here a small example how your package.xml could look like.
Basically, the only thing you would need to change is the name of your FlexiPage (in this case AccountFlexiPage) The rest, you can just copy-paste.
12345678910 | <?xml version=“1.0“ encoding=“UTF-8“?><Package xmlns=“http://soap.sforce.com/2006/04/metadata“><fullName>Accounts FlexiPage</fullName><types><members>AccountFlexiPage</members><name>FlexiPage</name></types><version>29.0</version></Package> |
view rawpackage.xml hosted with by GitHub
Then, in your windows explorer, you just select the flexipages folder and the package.xml file and you zip them together.
Then it’s just one easy step away to deploy this zip file into the Salesforce environment that you want. A good explanation on how to do this can be found here.
Once you have done this a few times, you will get the hang of it and then you can create these flexipages in under 5 minutes.
And who knows, someone might build a UI editor to construct these flexipages to bridge the time untill Salesforce builds it but don’t wait for that to start using this powerfull feature!
Cheers!!!