opportunity activity count - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Robin MeadRobin Mead 

opportunity activity count

I would like to be able to show all opportunities with or withought activities and include a count of the amount of activities that could appear in related lists and standard opportunity reports.

I had hoped to use a rollup summary but activities cant be counted, is there a way arround this?

Even just haveing a Has activity like the has product, would be helpfull.

Steve MolisSteve Molis
 You need to create a Custom Report Type (CRT) and select Opportunities with AND without related Activity Records.  

Setting Up Custom Report Types

Available in: Professional, Enterprise, Unlimited, and Developer Editions

User Permissions Needed
To create or update custom report types:“Manage Custom Report Types”
To delete custom report types:“Modify All Data”

You can quickly set up a custom report type so that users can create and run reports from predefined standard and custom objects, object relationships, and standard and custom fields that you specify.

To set up a custom report type:
  1. Define a custom report type by name, description, primary object, development status, and the category to store it in.
  2. Choose the objects for the custom report type.

    The objects available for you to choose from are based on the primary object's relationships to other objects. For example, if accounts are selected as the primary object for your custom report type, then you can only choose standard and custom objects associated with accounts, such as contacts or opportunities. This also applies to additional objects added to the custom report type. For example, if accounts are selected as the primary object for your custom report type, and contacts are selected as the secondary object, then you can only select objects associated with contacts as the third object on your custom report type.

    For more information on object relationships, see Overview of Relationships.

  3. Edit the layout to specify which standard and custom fields a report can display when created or run from the custom report type.

    You can only include fields associated with the objects that are part of the custom report type. For example, if you added the accounts object to the custom report type, then you can include account fields.

  4. Create a report from the custom report type to make sure it contains all of the objects and fields required for users.

    When you finish testing your custom report type, you can deploy it to users by setting

    Deployment Status to Deployed. For more information, see Defining Custom Report Types.
  5. Optionally, you can do the following:
    • If your organization uses the Translation Workbench, translate custom report types for international users. For more information, see Setting Up the Translation Workbench.Tip
      When creating a custom report type that will be translated into multiple languages via the Translation Workbench, we recommend that your personal language setting matches your organization's default language. This is to ensure that words which will be translated display in the correct language for translators. For more information, see Editing Your Personal Information and Company Information Fields.
    • Add the custom report type to apps you upload to Force.com AppExchange.

After you have set up a custom object, you can update it at any time. For more information, see Managing Custom Report Types.

Before you begin creating custom report types for your organization, review the following implementation tips and best practices.

Implementation Tips

  • Users with the “Manage Custom Report Types” permission can view and define custom report types that include objects they do not have permission to access. However, they cannot access data stored in those objects. For example, a user with the “Manage Custom Report Types” permission who does not have permission to view leads can view and define custom report types that include leads, but he or she cannot access lead data. This enables specific users to build report types for all users in their organization without compromising data security settings.
  • The primary object you choose determines the views available to users creating or running reports from your custom report type. For example, if you select accounts as the primary object for your custom report type, then users can view their report results by All Accounts or My Accounts from report builder's Show drop-down list.
  • You cannot add forecasts to custom report types.
  • You can add up to four objects to a custom report type. However, some of the object combinations you choose may not be able to reach that limit. For example, if you add contacts as the primary object, cases as the secondary object, and activities as the tertiary object, then you cannot add any additional objects because activities does not have any object relationships that extend beyond it.
  • Reports run from custom report types that include territories may display results differently than standard reports that include territories. This is because reports run from custom report types only display results with territories, such as accounts with territories, whereas standard reports that include territories may display results without territories. For example, if you select the Account Territory Report, results display accounts without territories. Furthermore, the Territories filter on report results run from custom report types that include territories does not include Multiple Territories or Missing Territories.
  • You cannot add the following fields to custom report types:
  • You can add up to 1000 fields to each custom report type.
  • Renamed fields from standard objects, as well as renamed standard objects, do not display as such on the field layout of the custom report type. However, renamed fields from standard objects and renamed standard objects do display their new names on the report and the preview page, which you can access by clicking Preview Layout.
  • Consider the following when adding fields via lookup to the field layout page of a custom report type:
    • You can only add fields via lookup that are associated with objects included in the custom report type. For example, if you add the accounts object to the custom report type, then you can add fields from objects to which accounts have a lookup relationship.
    • Selecting a lookup field on the Add Fields Via Lookup overlay may allow you to access additional lookup fields from other objects to which there is a lookup relationship. For example, if you select the Contact Name field from cases, you can then select the Account field from contacts because accounts have a lookup relationship to contacts which have a lookup relationship to cases.
    • The fields displayed in the Add Fields Via Lookup overlay do not include lookup fields to primary objects. For example, if accounts are the primary object on your custom report type, and contacts are the secondary object, then the Add Fields Via Lookup overlay does not display lookup fields from contacts to accounts.
    • Fields added to the layout via the Add fields related via lookup link are automatically included in the section of the object from which they are a lookup field. For example, if you add the Contact field as a lookup from accounts, then the Contact field is automatically included in the Accounts section. However, you can drag a field to any section.
    • Fields added via lookup automatically display the lookup icon on the field layout of the custom report type.
    • A custom report type can contain up to 60 object references. For example, if you select the maximum limit of four object relationships for a custom report type, then you could select fields via lookup from an additional 56 objects. However, users will receive an error message if they run a report from a custom report type and the report contains columns from more than 20 different objects.
    • If you include activities as the primary object on a custom report type, then you can only add lookup fields from activities to accounts on the select column layout of the custom report type.
  • Reports run from custom report types that include cases do not display the Units drop-down list, which allows users to view the time values of certain case fields by hours, minutes, or days.

Best Practices

  • After you save a custom report type, you can't change the primary object associated with it. If you want to change the primary object, you must define a new custom report type.
  • Choose “In Development” as the Deployment Status when first creating your custom report type to hide it from users while you are designing and testing it. Making the status “In Development” hides the custom report type and any reports created from it from all users except those with the “Manage Custom Report Types” permission. Furthermore, making the status “In Development” prevents all users except those with the “Manage Custom Report Types” permission from creating and running reports from the report type.
  • Choose “Deployed” as the Deployment Status when you want to allow users to create and run reports from the custom report type.
  • After deploying a custom report type, change the Deployment Status back to “In Development” if you want to make more enhancements to it.
  • Arrange fields on sections as they should appear to users.
  • Preview how the fields display to users in reports run from the custom report type by clicking Preview Layout on the Fields Exposed for Reporting section.
  • If the Translation Workbench is enabled for your organization, you can translate custom report types for international users.
  • Add custom report type to apps you upload to Force.com AppExchange. For more information, see What is an App?.
  • Preselect commonly used fields via a custom report type by clicking Edit Properties on the field layout, and then selecting the Checked by Default checkbox next to the field. Fields selected by default automatically display the checkbox icon (Checkbox icon) on the field layout of the custom report type.
  • Reduce the amount of time it takes a user to find fields to report on by grouping similar fields together on custom report types' field layouts. Furthermore, you can create new page sections in which to group fields that are related to one another. Additionally, you can group fields to match specific detail pages and record types.
  • You can create custom report types from which users can report on your organization's reports and dashboards. When defining a custom report type, select Reports or Dashboards from the Primary Object drop-down list on the New Custom Report Type page. For more information, see Defining Custom Report Types.
Robin MeadRobin Mead
Thanks SteveMo,

That looks like that will do the trick for reporting.

It woul be cool to be able to show a count in related lists but this will help.

Thanks again
Steve MolisSteve Molis
 If you have Hover Links enabled on the User Interface settings they will display a count of Activities at the top of the Opportunity Detail Page.  

Customizing User Interface Settings

The available user interface settings vary according to which Salesforce Edition you have.

User Permissions Needed
To modify user interface settings:“Customize Application”
To change your organization's user interface settings:
  1. Click Your Name | Setup | Customize | User Interface.
  2. Select or deselect each checkbox to modify the user interface settings for your organization.
  3. Click Save.

User Interface Settings

Enable Collapsible Sections
Collapsible sections give users the option to collapse or expand sections on their record detail pages using the arrow icon next to the section heading. When enabling collapsible sections, make sure your section headings are displayed for each page layout. Sections remain expanded or collapsed until the user changes his or her settings for that tab. If your organization has enabled record types, Salesforce remembers a different setting for each record type.Note
Call center users won't see incoming calls if they collapse the sidebar.
Show Quick Create
The Quick Create area on a tab home page allows users to create a new record quickly with minimal information. It displays, by default, on the tab home pages for leads, accounts, contacts, forecasts, and opportunities. You can control whether the Quick Create area is displayed on all relevant tab home pages. Note
The Show Quick Create setting also affects whether or not users can create new records from within the lookup dialog. For example, with the setting enabled, users can create a new account within the account lookup dialog while creating or editing a contact. Creating new records in the lookup dialog is available only if Quick Create is available for your chosen record type. In addition, users always need the appropriate “Create” permission to use Quick Create even though it will be displayed for all users.
Enable Hover Details
Hover details display an interactive overlay containing detailed information about a record when users hover the mouse over a link to that record in the Recent Items list on the sidebar or in a lookup field on a record detail page. Users can quickly view information about a record before clicking View for the record's detail page or Edit for the edit page. The fields displayed in the hover details are determined by the record's mini page layout. The fields that display in document hover details are not customizable. This option is enabled by default.Note
To view the hover details for a record, users must have the appropriate sharing access to that record, as well as the necessary field-level security for the fields in the mini page layout.
Enable Related List Hover Links
Related list hover links display at the top of record detail pages and custom object detail pages in Setup. Users can hover the mouse over a related list hover link to display the corresponding related list and its number of records in an interactive overlay that allows users to quickly view and manage the related list items. Users can also click a related list hover link to jump down to the content of the related list without having to scroll down the page. The Enable Related List Hover Links checkbox is the default selection.
Enable Separate Loading of Related Lists
Select this option to enable the separate loading of record detail pages: primary record details load first, followed by related list data. When you enable this option, users see primary record details immediately; as related list data loads, users see a progress indicator. Separate loading can improve performance on record detail pages for organizations with large numbers of related lists. This option is disabled by default. Note that this option does not apply to Visualforce pages, user pages, the self-service portal, or other pages for which you cannot control the layout.
Enable Inline Editing
Inline editing allows users to quickly change field values on a record's detail page, saving the user from having to access the record's edit page first. This option is enabled by default and applies to all users in your organization.Note
This doesn't enable inline editing for profiles. Select Enable Enhanced Profile List Views under Setup..
Enable Enhanced Lists
Enhanced lists give you the ability to quickly view, customize, and edit list data to speed up your daily productivity. When enabled with the Enable Inline Editing setting, users can also edit records directly from the list, without navigating away from the page. This option is enabled by default.Note
This doesn't enable enhanced lists for profiles. Select Enable Enhanced Profile List Views under Setup.
Enable New User Interface Theme
Note
Starting with Summer '10, new organizations have the new user interface theme enabled by default.

The new user interface theme updates the look and feel of Salesforce and moves user links, such as Setup and Logout, under the user name for all users in your organization. The new user interface theme is not supported in Portals, Console tab, or Help & Training.

Only users with supported browsers see the new user interface theme.

Enable Printable List Views
Printable list views allow users to easily print list views. If enabled, users can click the Printable View link from any list view to open a new browser window, displaying the current list view in a simple, print-ready format. The link is located next to the Help for this Page link in the colored title bar of the page.
Enable Spell Checker
Available in all Editions. If this option is selected, the Check Spelling button appears in certain areas of the application where text is entered, such as sending an email, or when creating events, tasks, cases, notes, and solutions. Clicking the button checks the spelling of your text. Spell Checker does not support all the languages that Salesforce supports. For example, Thai, Russian, and double-byte languages, such as Japanese, Korean, or Chinese, are not supported.
Enable Spell Checker on Tasks and Events
Available in all Editions. Select this checkbox to enable the Check Spelling button when users create or edit tasks or events. The spell checker analyzes the Description field on events and the Comments field on tasks.

Sidebar Settings

Enable Collapsible Sidebar
The collapsible sidebar gives users the ability to show or hide the sidebar on every Salesforce page that normally includes the sidebar. When you select the Enable Collapsible Sidebar setting, the collapsible sidebar becomes available to all users in your organization, but each user can choose his or her own preference for displaying the sidebar. Users can leave the sidebar visible at all times, or they can collapse the sidebar and only show it when needed by clicking the edge of the collapsed sidebar. For more information on using the collapsible sidebar, see About the Sidebar.Tip
If your organization uses divisions, we recommend that you keep the sidebar pinned and visible at all times so you always have access to the Divisions drop-down list.
Show Custom Sidebar Components on All Pages
If you have custom home page layouts that include components in the sidebar, this option makes the sidebar components available on all pages in Salesforce for all users in your organization. If you only want certain profiles to view sidebar components on all pages, you can assign those profiles the “Show Custom Sidebar On All Pages” permission.Note
If the Show Custom Sidebar Components on All Pages user interface setting is selected, the “Show Customer Sidebar On All Pages” permission is not available.

Calendar Settings

Enable Home Page Hover Links for Events
Select this checkbox to enable hover links in the calendar section of the Home tab. On the Home tab, users can hover the mouse over the subject of an event to see the details of the event in an interactive overlay. This option is enabled by default. Note that this checkbox only controls the Home tab; hover links are always available on other calendar views.

The fields available in the event detail and edit overlays are defined in a mini page layout.

Note
If you create all day events, Salesforce recommends adding the All Day Event field to the events mini page layout.
Enable Drag-and-Drop Editing on Calendar Views
Select this checkbox to enable the dragging of events on single user daily and weekly calendar views. This allows users to reschedule events without leaving the page. This option is enabled by default. Note the following:
  • Calendar views might load less quickly when this checkbox is enabled.
  • Drag-and-drop editing is not available for calendar views in the Console tab.
  • Drag-and-drop editing is not available for multiday events.
Enable Click-and-Create Events on Calendar Views
Select this checkbox to enable users to create events on day and weekly calendar views by double-clicking a specific time slot and entering the details of the event in an interactive overlay. The fields available in the event detail and edit overlays are defined in a mini page layout.
Note that recurring events and multi-person events are not supported for click-and-create events on calendar views.
Enable Drag-and-Drop Scheduling on List Views
Select this checkbox to enable users to create events associated with records by dragging records from list views on to weekly calendar views and entering the details of the event in an interactive overlay. This option is disabled by default. The fields available in the event detail and edit overlays are defined in a mini page layout.
Enable Hover Links for My Tasks List
Select this checkbox to enable hover links for tasks in the My Tasks section of the Home tab and on the calendar day view. This option is enabled by default. Users can hover the mouse over the subject of a task to see the details of that task in an interactive overlay.

The information presented on these overlays is configured by your administrator.

Setup Settings

Enable Enhanced Page Layout Editor
Select this checkbox to activate the enhanced page layout editor for your organization. When enabled, the enhanced page layout editor replaces the current interface for editing page layouts with a feature-rich WYSIWYG editor that contains all of the functionality of the original page layout editor as well as several improvements.
Enable Enhanced Profile List Views
Select this checkbox to activate enhanced list views and inline editing on the profiles list page. When this setting is enabled, you can manage multiple profiles at once.

Advanced Settings

Activate Extended Mail Merge
Select this checkbox to activate Extended Mail Merge for your organization. When selected, the Mass Mail Merge link is available in the Tools area on the home pages for accounts, contacts, and leads. Also, single mail merges requested from the Activity History related list on a record are performed using Extended Mail Merge functionality. For more information on using Salesforce to generate personalized form letters and other documents based on templates, see Mail Merge Overview.

Extended Mail Merge is available by request only. Contact salesforce.com Customer Support if you are interested in this feature.

Always save Extended Mail Merge documents to the Documents tab
When this checkbox is selected, all mail merge documents generated using Extended Mail Merge are added to the user's personal documents folder on the Documents tab, rather than delivered as email attachments. Users are sent confirmation emails when their mail merge requests have completed. Those emails include links for retrieving generated documents from the Documents tab. Note that these documents count against your organization's storage limits.
Robin MeadRobin Mead
While the instructions say you can show custom fields in the reports, I cant actualy see them.

I have added linked fields but cant find the custom fields, I assume I am just being blind.
Steve MolisSteve Molis
 Did you add the custom fields to the objects after you created the report?  CRT's to not dynamically recognize and add custom fields like Standard Reports do, you need to go back into the CRT Layout Editor and manually add them.  A bit of PITA, but it is what it is...