Pages

Monday, August 26, 2013

Salesforce: Activities Tab and View (Event or Task)

Question: do we have Activity tab in Salesforce? or Activity view in Salesforce?

The answer is YES, but not Out-of-the-box, you need to create it. Here are few options you can create Activity tab / view.

1. Custom Link
I just discuss on Custom Link in previous blog. So, you can create a new Custom Link and add it into Home Page Components then to Home Page Layout. remember you can create multiple Home Page Components with type = Links with different Links as the need. Create a new Custom Link:
- Set the Behavior = "Display in existing window without sidebar or header"
- Button or Link URL = https://xxx.salesforce.com/007  (change xxx to your Salesforce instance, e.g. na1 or ap1, etc)
So, instead of click tab, user need to click a link in left sidebar. Using this option will save you 1 tab usage, unless you are on Unlimited Edition or Performace Edition, you only can create maximum of  25 tabs for Enterprise, 10 tabs for Professional and 5 tabs for Group Edition.

Note:
  • You can enable "Show Custom Sidebar Components on All Pages" from Setup - Customize - User Interface to enable each tab showing the same sidebar component.
  • You can use https://xxx.salesforce.com/00T as well, this will show view without New Event button or https://xxx.salesforce.com/00U for view without both New Event and New Task button.



2. Web Tab
You can create Web Tab from Setup - Create - Tabs, Scroll to Web Tabs related list and click New button
URL = https://xxx.salesforce.com/007
But, there is NO option to hide header, so you will see double Salesforce header, this is not a good option, and we need to avoid this option actually.



3. Visualforce Tab
Same with option 2 above, but we need to create a very simple visualforce page (don't be afraid if you are not a Salesforce developer, just copy scripts from below). Go to Setup - Develop - Pages, click New button, enter the label and name, then copy and paste script below and click Save button.
<apex:page >
<apex:enhancedList type="Activity" height="600" />
</apex:page>
Then go to Setup - Create - Tabs, scroll to Visualforce Tabs related list and click New button, select visualforce page just created in dropdown list to create a tab for Activity.

Note: you need to enable Visualforce page to all Profiles will use this tab or add in Permission Sets for particular users. This will also count to 1 usage of Custom Tab.



If you notice, using visualforce page, you will not see Calendar buttons above Activities view, it only appears when direct access to URL https://xxx.salesforce.com/007 (example: using custom link)



Using both options, you can create and edit View the same as other objects view usage.

2 comments:

  1. Great Post @Johan. If you ever wanted those Calendar buttons along with the ListView on a Visualfore Page, then this could help: https://gist.github.com/anonymous/e236f61c247b7229de98

    ReplyDelete
    Replies
    1. Nice one Deepak, thanks for the input and sharing.

      Delete

Page-level ad