Making a Salesforce Opportunity leaderboard is possible, but I’ve seen some cases where the standard filters don’t work well enough. It is easy enough to make a report that shows “My Accounts,” “My Opportunities,” and others. Let’s look at some of the standard options: According to the documentation, My Opportunities - Searches ONLY the opportunities you OWN. My Team-selling opportunities - Searches ONLY the opportunities where you are on the SALES TEAM. My Team-selling and my own Opportunities - Searches BOTH the opportunities you OWN and the opportunities where you are on the SALES TEAM. My Team’s Opportunities - Searches ONLY the opportunities OWNED by you and the users who report to you in the role hierarchy. My Team’s Team-selling and their Opportunities - Searches the opportunities OWNED by you and the users that report to you in the role hierarchy, as well as opportunities where you or the users who report to you in […]
In the previous post, we looked at using the standard (button-click) way to create a new child record using Publisher Actions. Pretty basic stuff. Using Visualforce to create a custom action is a bit harder. Let's start with the documentation. The PDF provided by clicking on the link in the Actions screen (Account action is an example) has nothing about Visualforce. Searching in the Help & Training section yields a page Creating Visualforce Pages to Use as Custom Publisher Actions, but I can't see where that page is found in the help tree on the left side of the page. Interestingly, to find correct code (because the item above has a misprint) I had to go to Customizing Case Feed with Visualforce (PDF). Let's set up our use-case and see what we can do with a Visualforce publisher. As before, we want to create a Task from a Case. The […]
One of the most interesting – but least explained – features of Summer 13 (184) is Chatter Actions. There are three kinds of actions (Yes, you thought there were two, but there are more!) and after writing a few of each, here are some examples. The documentation is, as of this writing, both incomplete and incorrect, so this should help a bit. I also found some gotchas when using Chatter actions in a specific setting. Chatter Actions fall into two major categories: “Create a Record” and “Custom Action.” There are two locations for Chatter Actions: Object-specific and Global, meaning that Create actions and Custom actions can each be executed from a specific object Chatter publisher or can be created from the general publisher found on the Home and Chatter tabs. To review: Create action Global Object-specific Custom action Global Object-specific Clear, right? We could visualize it as first Object-specific, then […]
Workflow is great. I can simply and declaratively make changes, and can easily update things like email templates, criteria, tasks, etc. without using Eclipse and writing/running unit tests. Sometimes, however, workflow isn’t enough; we need to use a trigger. Today, I had a use-case that when a DateTime field is filled, a contact (identified via a lookup on a parent object – so a grandparent record) should receive a notification. That’s easy enough to do with a ISCHANGED(DateTimeField__c) workflow criteron, but the Email Alert can’t “find” the contact. A trigger is necessary. Here’s how I coded the trigger: I’ve left out a lot of parts here, but I hope that the main bit of using Trigger.oldMap to find the old value and compare it to the new one comes through. Happy coding!