Logo

general salesforce

How to Close or Complete Event Activities + Salesforce Bug!!

Salesforce Events – Closed or Open?

Do you know what determines whether a Salesforce Event Activity displays in the “Open Activities” related list or the “Activity History” related list?  Let’s start with an event activity with a start/end date in the past:

Event Details

This record displays on the Account detail page within the “Activity History” related list, not the “Open Activities” section.

account activity history related list

What about when you are selecting to view Open or Completed Activities within a Salesforce Report?

report show open or completed activities

 

Events Are Automatically Completed/Closed

Salesforce documentation indicates “All events will automatically be moved to the Activity History the day following the scheduled event date.”  In other words, unlike tasks where they are manually marked “complete” – events are automatically completed after the scheduled date has past.

I found this very interesting because I’ve seen events appear “completed” on the same day as the scheduled start/end date.

A Warning About Utilizing Report Data

Within Salesforce Reports, there is a field labeled “Closed.”  This field indicates whether the task or event record has been completed.  This isn’t an actual field on the record and cannot be found within the database utilizing a SOQL query.

event soql db details no closed field

The issue with Events is that the same exact “Closed” field can display different results depending on whether it is a standard or custom report type.

The same record above that displays in the “Completed Activities” related list displays as “Closed” = True in the standard activity report type:

Standard Report Type Closed Event

However, when using a custom report type the same record displays as “Closed” = False.

Custom Report Type Open Event

Come on Salesforce!  This can’t be by design, can it?!  I can only assume that because it’s really a ‘faux field’ and the report is determining whether the event is closed or not that this logic was only applied to the standard report types.

This can be dangerous particularly if you were using this field in a CRT as filter criteria or using this field to aggregate – sum/avg/etc across all activities.

What are your thoughts or issues with Events?  Have you created a custom field to let users manually indicate whether they have completed the activity?  There are numerous ideas on the Success Community regarding the way Events are marked complete.  Here’s one.  Please let me know your thoughts in the comments or on twitter @SFDC_r – I would love to hear from you!

SFDC Idea – Set Dashboard Running User To Role

SFDCr - Salesforce Ideas

Set Dashboard Running User To Role

Have you ever wanted to run a dashboard as a role instead of setting it to a specific individual user?  I know, I know, you are probably saying that you could simply use a Dynamic Dashboard so that it will always run as the logged-in user.  Besides the sad fact that this would use up one of your 10 dynamic dashboards (yes, a limit of 10 – even on Unlimited Edition.  C’mon Salesforce!) there are other reasons why you don’t always want it to run as the logged-in user.

For example, you may have a “Team Dashboard” with the running user set to the team’s manager.  The dashboard would then display rankings for every member on the team and how they stack up against each other.  When an individual rep clicks into an individual component, they only see the details of their own records, but on the dashboard everyone sees the same info.  When the manager clicks on a component, they would see the detailed report with data for the entire team.

This all works great, and only is really possible for many objects by setting the dashboard to run as an individual user (not dynamic).  Where the problem lies is that you have to change the running user upon any personnel changes concerning sales management.  If you have 100 sales teams within your org, you may end up becoming the ‘running user’ running far far away!  So, you’re wondering what would solve this dashboard dilemma?

Check out the following idea on the Salesforce IdeaExchange: Running User by Role.

Run The Dashboard As A Role – Not A User

This would be awesome!  You could set each dashboard to run as the manager role for each team and never have to adjust the dashboard or underlying reports again, no matter what changes take place with personnel!

What do you think?  Would this feature benefit you in your organization?  If so, vote!  Do you have other workarounds for the same situation?  Go ahead and tweet or post your thoughts in the comments!

Avoid Long Load Time To Edit Dashboard Component Report

Salesforce Quick Tips Edit Dashboard Component Report

Edit Dashboard Component Report

Have you ever wanted to edit the underlying report for a dashboard component and found it cumbersome?  A dashboard executes with a ‘running user’ and this user feeds into all of the underlying reports.  This is great, because it means that you can create a single set of reports and not have to edit the reports for the dashboard to provide useful data to an entire set of your users.

The Problem – Edit Dashboard Component Report

Because your user is likely placed very high up in the role hierarchy (so that you have access to all or most of the Org’s records) when you click on a dashboard component to view the underlying report, it can take many minutes (or even timeout).  Your users don’t have this issue, they click the dashboard component and the user running the report would only see records at or below them in the role hierarchy – likely running quickly.  You as the admin, however, can only finally click “Customize” to edit the report after waiting a long time (and that’s if it doesn’t timeout).

The other option to avoid the above dilemma (and wait) is to navigate to “Reports” and locate the report you want to edit.  Instead of running the report, click the arrow and “Customize.”  The issue here is that you have to know which report you want to edit, which probably requires “Editing” the Dashboard to view the exact name of the report for the specific component.  This can be time consuming and cumbersome as well.

A Better Solution – Salesforce Quick Tip!

I present to you a better solution.  Simply right click the Dashboard Component you would like to edit the underlying report for and copy the URL.  Paste the URL into your browser (probably a new tab) it should look something like this: https://[YOURSERVERURL].salesforce.com/00O61000003p9Nj if it happens to have anything after the Report ID – just remove it so it looks like the above.  Now add “/e?” to the end of the URL.

Final URL: https://[YOURSERVERURL].salesforce.com/00O61000003p9Nj/e?

Problem Solved

Now just hit Enter and you will be taken directly to editing the underlying report – and it will load quick.  Never get stuck waiting for a report to load just to edit it!

What quick tips do you have related to Dashboards or Reports?  Feel free to post in the comments or on Twitter!

Future-Proof Your Org w/ a Relative Salesforce Server URL

Salesforce Quick Tips Logo

Use A Dynamic/Relative Salesforce Server URL

Today, I’m going to show you how to future-proof your Salesforce server url.  Instead of specifying a specific Salesforce server, we will use a relative Salesforce server URL.  What does that mean exactly?  Well, have you ever created hyperlinks used in many email templates that point to a page within Salesforce?  Are they “hard links” that point to a specific Salesforce server, “https://na30.salesforce.com/” for example?

If Salesforce moves your org to a different server, you will have to go into each and every email template and make the change!

The Solution/Workaround – Relative URL’s In Email Templates

Create a formula field on the User object using the following formula:

LEFT($Api.Enterprise_Server_URL_270, FIND( "/services", 
$Api.Enterprise_Server_URL_270) -1)

Then, use this field whenever you need to reference the Salesforce Server URL.  If Salesforce moves your org to a different server, no changes necessary!

Do you have any other tips for future-proofing your org?  Post in the comments or message on Twitter!

Also check out the Go With The Salesforce Flow series!

How to get the MAX or Most Recent Date of several date fields in Salesforce Formula

Goal: Return the MAX or Most Recent Date of several dates

Recently I needed to get the most recent date of 4 separate date fields.  I created a new formula field and was shocked to find that MAX(custom_date_1,custom_date_2,custom_date_3,custom_date_4) did not work.  MYSQL allows MAX() to function for date fields and I was surprised it didn’t work here!

Workaround: MAX(DATE) Formula

The full formula example of the workaround is below.  An important aspect of the formula is to handle if any of the dates that are being compared are null.  Also remember to add DATEVALUE() for any fields that are of type DATETIME.

IF(
    AND(
        ISBLANK(custom_date_1),
        ISBLANK(custom_date_2),
        ISBLANK(custom_date_3),
        ISBLANK(custom_date_4)
    ),
    NULL,
    DATE(1900, 01, 01) +
    MAX(
        BLANKVALUE(
            custom_date_1, 
            DATE(1900, 01, 01)
        ) - DATE(1900, 01, 01),
        BLANKVALUE(
            custom_date_2,
            DATE(1900, 01, 01)
        ) - DATE(1900, 01, 01),
        BLANKVALUE(
            custom_date_3,
            DATE(1900, 01, 01)
        ) - DATE(1900, 01, 01),
        BLANKVALUE(
            custom_date_4,
            DATE(1900, 01, 01)
        ) - DATE(1900, 01, 01)
    )
)

I hope you find this helpful!

Multiple tabs are your Salesforce friends!

I’m sure you leverage multiple tabs in your everyday web browsing life, but have you utilized them in Salesforce.com?  No, I’m not talking about (my 3-year-old son says, “but but but that’s not what I was talking about!) the objects you add to apps to display in the tab bar at the top of every page within Salesforce.  I’m talking about using multiple browser tabs.  I’ve found them to be instrumental in day-to-day administration and configuration of the platform.

For example, I’ve opened multiple browser tabs to quickly compare 5 or 10 page layouts and quickly used the keyboard to toggle between them rapidly to ensure all layouts include/exclude particular fields with the correct access (read-only) and placement.  Sure, I could have used a single tab and used the Salesforce drop-down to select the next layout and repeated 10x, but opening them all up quickly and then cycling through is much faster.

Multiple Tabs – Profile – Object Permissions

While editing profile permissions, I’ve opened multiple a tab of each profile in question and quickly toggled between them to compare and contrast.  Sure, I do know that the enhanced profile interface would let me add a new view with columns for each CRED on specific objects and view those for whichever profiles I want.  But this is honestly a pain.  I can only have 10 columns and each CRED attribute (Create, Read, Edit, Delete, View All, Modify All, etc.) take up a column.  I can maybe get two objects within a view and that takes time to build if you are leveraging many standard and custom objects including managed packages.  Not to mention you can’t add page layout or record type assignments to these views.

Below is a quick example of this.  I was not able to use my keyboard shortcuts while creating the GIF, so I just cycled through with the mouse.  The key here is to learn the keyboard shortcut so you can toggle through much faster, and focus all of your attention on the text.  Any differences will quickly jump out at you!  Once you are done cycling through the current objects on the page, hit space bar on each tab as you cycle through.  It will scroll the window down by the same amount on each tab so that they all line up perfectly for you to continue your review.  In this case the only difference is the Tab for Leads is “Default Off” for the Support Profile.

Use Multiple Tabs to Check Profile Permissions

Multiple Tabs – CRED – Field Security – Page Layouts & Record Types

From here I can open up multiple tabs for various objects to edit/review or open the same object but for various profiles (example below).  Here I can quickly see CRED permissions, field security, and page layout & record type assignments and make the necessary changes.

Use Multiple Tabs to Check Assigned Page Layouts Record Types And Object Perms

Multiple Tabs – Available Picklist Values for Record Types

This also comes in handy when quickly reviewing the available picklist values for different record types.

Use Multiple Tabs to Check Record Type Available Picklist Values

Admittedly, these examples are simple and I wasn’t able to cycle through as fast as you can with the keyboard.  It may seem that you could just as easily accomplish a simple task with a single browser tab/window.  But what if you had 10 different picklist fields to compare for 10 different record types?  Using multiple tabs can help you quickly and efficiently review settings across the platform and make changes if necessary.

How do you leverage multiple tabs in your Salesforce Administration?  Would love to hear your comments!