Archive for Configuration Category Feed

Using a colon in the Report Name

I posted this in the Dreamforce Chatter app and it got a nice response, so I thought I’d blog about it here too.

It’s subtle tip for you perfectionists out there that makes reports look just a tad more professional. If you add a colon (e.g. Orders: Aging) to your report name, it will display the report name on 2 separate lines when viewing the report. Use this to create a naming convention for your reports like (category: detailed description) or for long report names so they display nicely.

I don’t think this is an actual, documented feature from Salesforce, but it’s been this way for years.

Look at the difference between naming a report “Orders – Aging” and “Orders: Aging”. It’s a subtle difference, but it’s something I use regularly and thought I’d pass along.

Comments (6) comments feed

Map as Lookup Field

This was also posted to the new Arrowpointe Product blog. We are moving all product specific information to that new blog and keeping this blog focused on developer related information. Please subscribe (rss, email)

Geopointe has a number of under-the-cover features (and more to come) that allow you to integrate with the application.  One such feature is the ability to use the map as a means of populating a Lookup field.

Below is a video showing this feature in action.

(for best results, choose an HD viewing option after starting the video and use full-screen mode)

Enabling the Feature

The feature is enabled through the use of a Custom Button that simply passes additional parameters across in the URL.  The URL in the video example is:

&wbButtonText={!URLENCODE("Relate This Account to " & Account.Name)}

Let’s break it down


The above is the URL from the button included with the application. It is required to sent the user to the proper page in the proper context.


wbRecordId is the ID of the record we will be writing back to.


wbField is the field on that record we will be populating.


wbLookupObject is the object type that we will be searching for and populating the lookup field for.

&wbButtonText={!URLENCODE("Relate This Account to " & Account.Name)}

wbButtonText is optional, but can be included if you want to customize the button’s text. It is recommended to use the URLENCODE function when specifying your text, especially if you are merging in data from the system.

Comments off comments feed

Link to View Pending Workflows

I’ve been getting into Timed Workflows lately and I’ve found myself consistently using the Timed-Workflow Monitoring page to see what’s going on with a record. I made it a bit easier on myself by adding a custom link to my Opportunities that let me see the pending workflows for a record. Thought I’d share it.


It’s broken down as follows:

  • /setup/own/massdelete.jsp?ftype=WFTimeQ – this brings you to the Monitoring page.
  • &col0=TargetEntity – chooses the “Record Name” option in the first row.
  • &oper0=e – sets the comparison operator to equals
  • &fval0={!Opportunity.Name} – Puts the Opportunity Name in the value to search for.

The best the link can do is bring you to the page with the form filled in.  It’s up to you to click the search button.  So it’s down to 2 clicks from about 8.

Comments (3) comments feed

Solving a Search Dilemma regarding CustomObject.Name

On a recent project, I was migrating a customer from the Contracts object to a Custom Object (Contracts are not supported in Customer Portal for some odd reason).  The Contract Number was being imported to the Name field on the new Custom Object.  To do so, I had to make the Name field a Text field so that we could maintain the value.  We also wanted to keep the formatting of 00000123 for contract #123.

After import, I converted the Name field to an Auto Number and set its mask to be {00000000} and its starting number to be the next one in the sequence.  When you change from a Text to an Auto Number field on the Name field of a Custom Object, the old data is left alone.  Had I imported, “123” into the Name field, Salesforce would not apply the mask.  Thus, I had to import “00000123” on the migrated records.

The issue my client discovered is that you can’t search for “123” in the Sidebar Search to find the Custom Object record that was imported.  It will work for records generated after the field was changed to an Auto Number, but not the converted data.  To find the legacy data, we’d have to tell the users to search for the full value of “00000123”.  Not good.

The resolution was actually pretty simple.  I added a new text field to the object and have a Workflow Rule that copies the Contract Number to it.  On Custom Objects, all text fields are indexed.  Voila!  It was searchable.

Comments (5) comments feed

Sidebar Summary using Visualforce

About a year ago, I posted about the Sidebar Summary.  The Sidebar Summary exists in the sidebar and displays the counts of some important queries.  The counts are also hyperlinks to a view or report representing that query.  It’s a very handy thing to have in your sidebar and I use it all the time for my own work.  However, because it’s an s-Control, it runs a little slow.  In fact, it ran slow enough to make me uncheck the user interface option “Show Custom Sidebar Components on All Pages”.

I changed it into a Visualforce page with a custom Apex controller and now it runs super fast and I am able to keep the “Show Custom Sidebar Components on All Pages” option turned on and see it on every page I go to.  There’s a bit of hardcoding in here, but it gets the job done pretty well.  Bye bye s-Control.


The Page is almost all raw HTML.  The only dynamic thing in there are the count values.  Each one retrieves the value from a specific “get” method in the controller.  If you like the queries I use, then the only thing you’ll need to confirm are the URLs that get linked to.  The first 2 go to Views in my Org and the last 2 go to Reports in my Org.  You’ll need to change those URLs.

I named the VF Page “SidebarSummary”.

<apex:page controller="VFController_Sidebar_Summary" sidebar="false" showHeader="false" standardStylesheets="true">
<style type="text/css" media="all">
body{margin: 0; padding: 0; color: #000000; background-color: #E8E8E8;}
#DIV_Container {background-color: #F3F3EC;}
<div id="DIV_Container">
<tr><td><em>Unread Leads</em>:  </td><td><a href="/00Q?fcf=00B30000005JhsT" target="_parent"><b>{!UnreadLeads}</b></a></td></tr>
<tr><td><em>Leads - Not Contacted</em>:  </td><td><a href="/00Q?fcf=00B30000005Jhru" target="_parent"><b>{!NotContactedLeads}</b></a></td></tr>
<tr><td><em>Oppty - Next 30 Days</em>:  </td><td><a href="/00O30000001aEHV" target="_parent"><b>{!Next30DayOppty}</b></a></td></tr>
<tr><td><em>Oppty - Past Due</em>:  </td><td><a href="/00O30000001aEHV" target="_parent"><b>{!PastDueOppty}</b></a></td></tr>


The controller has a method for each query to be run.  Each query is a count() query and returns an Integer.  At the end is a really lame Test method, but it does get 100% of the code covered.  I am certain the code works, so I didn’t do too much with the Test method.  Salesforce just requires the code to be tested.

public class VFController_Sidebar_Summary {

public Integer getUnreadLeads() {
return [
select count() from Lead
where IsConverted = False
AND IsUnreadByOwner = TRUE

public Integer getNotContactedLeads() {
return [
select count() from Lead
where IsConverted = False
AND Status = 'Open - Not Contacted'

public Integer getNext30DayOppty() {
return [
select count() from Opportunity
where IsClosed = False
AND (CloseDate = Next_N_DAYS:30 OR CloseDate = TODAY)

public Integer getPastDueOppty() {
return [
select count() from Opportunity
where IsClosed = False
AND CloseDate < TODAY

static testMethod void testVFController_Sidebar_Summary() {
Test.setCurrentPageReference(new PageReference('Page.SidebarSummary'));
VFController_Sidebar_Summary controller = new VFController_Sidebar_Summary();
Integer i1 = controller.getUnreadLeads();
Integer i2 = controller.getNotContactedLeads();
Integer i3 = controller.getNext30DayOppty();
Integer i4 = controller.getPastDueOppty();



<span style="text-decoration: underline;"><strong>Homepage HTML Component</strong></span>

I created a component for the Narrow side and put the following HTML into the editor.  Essentially, you create an IFRAME and embed the VF page into it.  I found a (unsupported) trick on the forums to remove the developer bar from a page.  Just add <strong>?core.apexpages.devmode.url=1</strong> to the URL.  This will turn off development mode when that page is rendered.  This is important for this little iFrame page on the sidebar.  From what I've gathered, this hack is not supported and could change at any time.

The code below should work for you.  The only thing you might need to change is the Page URL if you didn't name your page SidebarSummary and the height of it.

<iframe src="/apex/SidebarSummary?core.apexpages.devmode.url=1" frameborder="0" height="100" width="100%"></iframe>

Let me know what you think.

Comments (24) comments feed

« Previous entries