[SalesForce] Creating a tab for the Activities tab in Salesforce 1

I i want to create a tab for activity tab. Is it possible to create by customization or i need to create it using VF page. Requirement: I want to display the activity tab on salesforce1 app. Please guide me the best way i can do it. I am totally new with Salesforce1.

Best Answer

Strictly speaking, tasks and events live on the "Home" tab. You can verify this by going to https://login.salesforce.com/?startURL=%2F00T and observing (login required if you haven't yet). The easiest way to get there is to just visit the list from your home page, in the calendar section on the lower-right corner.

Creating a tab for any standard object is definitely not straight-forward. Keep in mind that any option you choose will result in slightly broken behavior. You have a few choices:

Visualforce Redirect

You could create a Visualforce page that directs you to the desired drop-off point, and create a Visualforce tab for the page.

Page

<apex:page controller="redirectSomewhereController" action="{!redirect}">
</page>

Controller

public class redirectSomewhereController {
    public PageReference redirect() {
        return new PageReference('/00T');
    }
}

As a secondary choice to this, you could use JavaScript to redirect them via the location URL, but this results in a flash of a page that they shouldn't see, while the redirect method here just takes an extra second or so to navigate.

Web Tab

You can create a web tab to redirect somewhere, but you're left with two somewhat unsavory choices.

Mini-Navigation

Use the following URL to switch to Mini-Navigation:

/00T?isdtp=mn

This creates the page in a smaller font (part of the "console" feature), stripped of its tabs, sidebar, and other fluff. Navigation will occur in a frame, with the tabs and setup menu along the top, as normal. This can be frustrating, as you have to actually click on another tab to restore functionality. The "current tab" will remain such until they navigate away, even if they click on a totally unrelated object, because it is, after all, a frame. Also, some pages, etc won't work in a frame.

Wrapped View

The other way is to simply forget to include isdtp, which results in the tabs appearing twice (and possibly the sidebar, etc). This is equally annoying, and can't be easily fixed either. They'll lose a good portion of their screen space, making the tab useless, unless they have a very large monitor or high resolution. Plus, it looks tacky.

Visualforce Page

Of course, you can create an entire page that looks just like a regular "Object Home" tab, but that means you'll spend a lot of time making it look just like any other page, including a page for navigating list views, etc. This is a lot more work than its actually worth, especially if you want to maintain the illusion that it's a real tab, since it would otherwise display the Home tab as the selected tab for the rest of the time.

Off the top of my head, you'd need to simulate the following pages:

  • Object Home
  • List Views
  • Object Detail
  • Object Edit

Summary

Avoid the hassle, and simply show your users where to click. Also, don't remove the calendar from the home page, which is present by default, or, if you insist, then use a sidebar custom link so they have access to the list when they want it.

Related Topic