Generate a Report Right From the Record Page

One of the major perks of using is its robust Reporting tool. Although the Reporting tool is quite capable, one drawback of it is that it's somehow separated from where you'd mostly spend time working through the data. If you're looking at a particular Lead record and wanted to create a report, you'd have to navigate to the Reports tab and create a report there. Today, I'll be showing you a quick way to create a report from the click of a button right from the record page. For my tutorial, I'll create a button an place it on the Leads page- I will then have the ability to generate a report on All Open Leads; right from that button.

Click to read more ...


Custom Objects in Salesforce

In Salesforce, you're able create a custom object to store a particular set of data where users can create and manage that data all under a tab . Today, I'm going to show you how to create a custom object in Salesforce and place its data under a tab.


Building the Structure of the Custom Object :

In this tutorial, I'll be creating a "Reservations" custom object to be able to create and track customer reservations.

  • To get started, go to SetupApp SetupCreateObjects. Then click "New Custom Object."

  • Next, fill in the name for the object and click "Save."

  • Under Optional Features, make sure to allow for Reports, Activities, and Tracking Field History.
  • Next, I'm going to allow for Adding Notes and Attachments. Tick the checkbox to "Launch new Custom Tab Wizard" to customize the look and feel of the tab.

Creating the Tab for the Custom Object:

Now that I've built the structure of the custom object "Reservations," I can create the Tab where the object will be stored.

  • Pick the appropriate style of the tab and click "Next'.

  • Next, add the profiles you want to see and/or use the "Reservations" objects, then click "Next".


  • Then, determine which Salesforce apps you want this object to be available and click "Save".

  • Finally, under Custom Fields and Relationships, create the appropriate custom fields for the object. I'm going to add a new custom field "Reservation Date and Time"
  • Now, you can see the "Reservations" tab at the top where you can create new reservations.


Standardize Countries and States in Salesforce

Often times importing new data into your Salesforce org will result in having inconsistent data. This inconsistency is particularly found in Countries and States/Provinces, such as the values (US, Usa, us, usa) where they should be updated to United States, instead. Today, I'm going to give a tutorial on how to use Salesforce's Mass Update Addresses; to standardize your countries and states.

Standardizing Countries:

Initially, you want to update the countries first then the states. To get started:

  • Go to your name> Setup> and search for "Mass Update Addresses" or go to Administration Setup> Data Management> Mass Update Addresses
  • Select "Country", then click Next.

  • From the "Available Values" column, select the countries you want standardized (this view can display a maximum of 100 countries, if you can't find the countries you want updated, search for them in the above search box) and add them to the "Selected Values". Then, enter in the new name you want applied to the selected countries and click Next.

  • After that, you'll be shown a list of where records of those countries are found. Click "Replace" to replace all those countries with the new one.

Standardizing States:

Now that you've updated the countries in your org, standardize the states in those countries:

  • In Step 1, select "State/Province" and enter in the country in which the states belong to and click Next. 

  • Pick the states you want updated and enter in the new name and click Next. Then, review where those states are found in your data and click Replace to replace them with the new name.

Tips on Mass Updating Addresses in Salesforce:

  • Always standardize the countries before the states.
  • Keep in mind that once you've updated the values of countries and states, all associated filter conditions will be affected and that includes: assignment rules and web-to-lead, which then should be updated with the new values.

Salesforce Lead Queues

In Salesforce, Queues allow for management and organization of records in Leads, Cases, and custom objects. Lead Queues are particularly helpful because they allow you to funnel a group Leads into a queue based on a particular criteria whereby users in that queue can claim ownership of those Leads. For example, you can create a Lead Queue to distribute newly created Leads or those captured from web by region/territory (West Coast, North Pacific...etc) Today, I'll be giving an introduction on how to create a Leads Que.

Creating Regions/Territories:

First, we're going to create a queue for each region.

  • To get started, go to Setup> Administration Setup> Manage Users> Queues and click New.
  • Name the Queue and optionally, you can assign an email address specific for the queue; users in that queue will receive updates on actions.
  • Next, pick the object you want to create the queue in.



  • Next, assign users to the queue. Alternatively, you can assign a Group of users to a queue. Then click Save.

Assigning Rules for Lead Queues

Now that you've built the queue, it's time to create rules to automatically assign users to the appropriate region/territory queue. Go to Setup> Customize> Leads> Assigning Rules and click "New". In Assignment Rules, you can prioritize the order of rules.Assigning Rules will run on an ascending order.

  • First, set the order of the rule.

  • Enter the criteria on which you want the Assignment Rule to apply
  • If you have multiple rules and depending on the logic, you can modify the logic of the rules right under the list.

  • Finally, enter the name of the queue you want the records with the above criteria to go to. click Save.


And now, users assigned to the queue can have a list view of all records in that queue where they can assign ownership accordingly. Only those users and users of higher hierarchy will have access to that list view.


Salesforce: Create Your Own App Marketplace

Last month, Salesforce announced Private AppExchange-- a feature that lets managers create a private app marketplace with a specific selection of apps totally private to their organization.

Click to read more ...


Salesforce Page Layout

In SalesforcePage Layouts allow for customization of UI pages for users in your organization. And often times throughout, you have pages of objects that might contain items that are not used by many users. Today, I'm going to explain how you can customize a Salesforce page layout with the fields, related lists, and custom links that suit your organization's use.

In the example below, I'll change the layout of the page Contracts. Note that you can "Edit" the current page layout of that object, but it's best to create a new Contract Page Layout and then assign it the default one.

  • To get started, go to Your NameSetupCustomizeContractPage Layout> Click on New.

  • Fill in the appropriate information and click "Save".

  • Next, drag and drop the fields, buttons, and related lists you want on the Contract Page Layout.

  • Then, click "Save".

Assigning Page Layouts

Now that you've created the page layout, you can assign it to the appropriate user Profiles in your Salesforce org.

  • Go back to the "Contract Page Layout" and click "Page Layout Assignment".

  • Pick the profile and assign the appropriate Page Layout. Then, click "Save".


Introducing Salesforce Identity

In the past organizations were able to manage their employee's access to applications and servers as a security precaution through Active Directory. But now with the cloud-based technologies, like, companies are finding it nearly impossible to manage users' access behind a firewall. Good news! Salesforce announced this week that Salesforce Identity is now open to the public: a tool that helps Salesforce admins manage user identities both in the Salesforce eco-system and in third party apps, including mobile apps. This means that a Salesforce Admin is able to set user access to apps like Evernote, Dropbox, and Sugar CRM. Salesforce Identity was first debuted at Dreamforce 2012 and had been a beta feature since.

"It's not a as straightforward as a beta because we've opened up a series of platform services that we already use for all of our customers...with Mobile Identity, for example, we've used that to deliver our own mobile applications, and we're extending that now to any application that wants to plug into our app ecosystem." Said Salesforce VP of Product Management, Chuck Mortimer.

One of the things Salesforce Identity can do is extend user privileges from Microsoft Active Directory to Salesforce users. Salesforce admins will basically be able to manage and control users' rights and access to third party apps and those within the Salesforce ecosystem all under a single console, effectively giving a single-sign-on to users in their organization.

Salesforce Identity is rumored to be free for Enterprise and Unlimited Salesforce editions. It will cost an additional $1 per user, per month, if you want to control both identity access on for cloud apps and otherwise, like Microsoft Active Directory.



Support for Testing Http Callouts

With Winter 13', Salesforce made a giant leap forward for developers who integrate and exchange information with external systems using Http Callouts. When I talk to many developers, unit tests are an after thought and a sore subject. Thankfully and I feel for good reasons that mentality is starting to shift and developers (including myself understand the true benefits. 

Let's step back for a second and look at the most common feedback I both get and see when I talk to people about unit tests. All of these are actual statements.


  • Who has time to write unit tests when we barely have time to come up with the solution
  • I'm a developer, not a tester
  • Structing my code to be unit tested takes too much time


Now that we've heard some of the excuses and objections let's look at some of the benefits


  • Tests end up being good documentation. Typically boilerplate documenation has no real value. When coders want to know how something works they look for examples and unit tests provide many.
  • Forces you to stop and think - too often we plow through and then get a critical juncture and realize that what we've done doesn't quite line up with the end result we needed. With unit tests, you can you can write out a test for the end result you need and you'll very quickly know when you get there
    • On top of this, when we stop and think we start to get creative. For example if you you expect and Integer from a method but instead get null, you quickly realize you need to handle a situation like that. i.e. handle unexpected outcomes.
  • Tests end up protecting us from the next programmer down the line. While many tend to work alone or prefer it, there is going to be a day when someone decides to change something and they just start clipping wires. The problem is that if no tests are in place you don't know the problems until they are too late. Tests are your alarm system for tampering (even when intentions are good).
  • Tests get you out of the compile run, compile run, compile run mentality when you just run and tweak until it finally works. When you do this, in the back of your mind, you know you probably didn't try everything. By adding unit tests you can very quickly simulate the bad, good users and how the code is going to react.



Okay, now that we've gotten ourselves fired up about Unit Testing we can take advatage of the changes that were made as part of Winter 13'. Before Winter 13' if your code made and outbound call (a callout) it was difficult to run unit tests against that code. Salesforce now has native support for handling callouts made in a test context. This allows you to get an artificial response that will not only increase your test coverage but it is going to simplify testing. 

A new Test.setMock method has been added. At runtime, this lets Apex know to handle the callout and generate a mock response. 

You've got two ways to Test HTTP Callsouts:


  • By implementing the HttpCalloutMock interface
  • By using Static Resources with StaticResourceCalloutMock or MultiStaticResourceCalloutMock




  1. The class that implements the HttpCalloutMock interface can be global or public
  2. By annotating the class with @isTest you'll exclude if from the callout limit of 3MB








Salesforce Tip: Simple Ways to Find Record-Type ID

In Salesforce, "Record Types" are a way to arrange and classify data in an object. An example of how Record Types can be particularly helpful is when you want to assign different sets of data to different groups of sales teams.

Whenever you're working to customize or change something in Salesforce and need to reference Record Types, you must have the appropriate Record-Type ID. There are two ways to find them:

  • Go to the Record Type (Setup> Customize> (object)> Record Types). Click on the record type. Find the Record Type ID in the URL between id= and &type.

Alternatively, you can create a custom/formula field with the value Record-Type ID

  • Go to Your Name> (appropriate object) Customize> Fields> under custom fields, 
  • Click "New". 
  • Make sure you pick Formula as the type and then Formula Text and click Next. 
  • You can label the field "Record Type".
  • Finally, enter "RecordTypeid" under Advanced Formula tab.
  • Don't forget to hit "Save".