Top Enhancements in Spring'13

Salesforce has packed the Spring '13 release with a bunch of new features.

Chatter is taking the lion's share of those enhancements; it's been very clear that Salesforce is investing heavily in Chatter, which is great! If you haven't been using Chatter in your organization, now is the time to start! If used effectively, Chatter can offer your organization huge productivity and efficiency: harnessing consumer-driven workflows into the enterprise. 


  • Create and Manage Tasks From Chatter: Tasks will now automatically appear in the Chatter feed.That's right, there's no need to programmatically "roll-up" the tasks to the parent record's Chatter feed.  Also, tasks can be created directly from a record's Chatter feed. Both of these features can be toggled on and off under Chatter settings.
  • Chatter: Reply via Email to Likes and Comments: this is done the same way you can reply to a Chatter post.
  • Smaller Chatter Messenger & API Enhancements
  • Salesforce for Outlook: which Salesforce refers to as "Viewing Your Salesforce World in Microsoft Outlook" .This was initially released as Beta on the Winter '13 version. This highly anticipated version allows you to view Contacts/Leads in a side-panel when reading an email in Outlook. From the panel, you can add an email and see records' activities. 





Oracle Acquires Eloqua 

Oracle Corp has agreed to buy Eloqua, makers of cloud-based marketing automation software, for about $810 million as it seeks to expand its cloud presence. This attempt by Oracle to stifle competition with Salesforce has sparked a series of acquisitions by companies like IBM Inc's acquisition of Kenexa and SAP AG's purchase of SuccessFactors. Also, Oracle, which came late to cloud computing, purchased RightNow Technologies for $1.5 billion last year. 

"The acquisition of Eloqua will add a leading market automation solution to Oracle's strong Salesforce automation products and the recently acquired RightNow call center automation solution,.." said Nomura Equity Research analysts."...We would expect Oracle to continue to make acquisitions in this space, to bolster its Fusion Applications suite and respond to competitive pressure in the applications market from SAP and" Nomura said.

It's important to note that Oracle's CEO Larry Ellison mocked cloud computing in 2008 as "complete gibberish".  Knowing Mr. Ellison though, I think he was mocking what marketeers were deeming cloud computing. He is a pretty smart guy in my opinion...


Cross Object Formula Fields

Salesforce allows for cross-object referencing

In many Salesforce orgs, it's become a great need to be able to reference fields of an object to a field in another object. Fortunately, Salesforce allows for cross-object referencing and in this tutorial I'll show you a greate way to map a field to both Accounts and Contacts on convert:


This code allows a Cross Object formula field to get the value of the field on contact and account:





Validate Salesforce Account


Today, I'll show you a great way to validate an Account based on the following conditions:


  1. If Budget (Number Field)exceeds 10,000
  2. If Decision (Picklist Field) equals Yes
  3. If Timeline (Date field) is not blank


All above conditions must be true for the Custom/Picklist field to be set to "Yes". Here is how to do it: 


  • First, create a custom field (is Account Qualified?)
  • Set the Custom Field type to Formula with Text is output type
  • Copy and paste  the code below:


IF( AND( Budget__c >9999, ISPICKVAL(Decision_c,"Yes"), ISBLANK(Timeline__c)), "Yes", "No")





Track Field Value Changes

Salesforce tip of the day!

If you're a Salesforce admin and have multiple users working on different sets of data, it is often important to track whatever changes are made to the records. Salesforce offers a great way to do just that: Tracking Field History tracks the time and the name of the user committing the changes:


  • Click on "Setup" under your name



  • Go to, App Setup> Customize> pick the object you'd like to configure (Lead)> Fields

  • Click on "Set History Tracking" and then tick the checkbox "Enable Lead History"
  • Select the field(s) you want tracked and then click "Save"
  • Go to your object's Page Layout & click "Edit" to include the Track History related list. 

  • Find the "Related Lists" section of your Page Layout, then drag & drop the "Lead History" related list



Now, every time a user changes a value in those fields, the name of the user and the time the changes were made will be displayed under the Lead (object) History related list:


2013 Predictions On The Data Industry 

It has become a tradition that at the end of each year, predictions of what will happen the following year. I've been thinking about this and would like to share my top 3 predictions in the world of data!

  • Cloud is the New Norm: we’ve all seen how seems to do no wrong and has absolutely eradicated on-premise/legacy systems in a lot of organizations.  However, the focus has been all but on IT governance.  Because businesses want to leverage IT and don’t want it to slow them down, Cloud has effectively fulfilled their needs. However, a gap in the IT governance has yet to be filled by the Cloud. 2013 will be the year for Salesforce to do just that!
  • “Social Media” Disillusions: Companies have expressed great emphasis on social media given how powerful a tool it has become. However, many companies need to re-evaluate their strategies and learn how to leverage it effectively. Recently, IBM has reported that Twitter has contributed absolutely ZERO of the Black Friday traffic! This all suggests that “social” will be short-lived.
  • The CMO Takes Over the CIO: I realize this is merely a prediction, but there’s no doubt that recent debates have emerged about the CMO (Chief Marketing Officer) spending more time and money on Information Technology than the CIO (Chief Information Officer). This should not come as a surprise, IT buyers this decade have become much more intelligent than ever before.

This concludes my predictions for 2013, feel free to share yours in the comments below!


Apex Unit Test



I’ve been developing code on various platforms for years, but lately I’ve been working on Saleforce’s proprietary language apex.  If you know java then apex should not be that strange to you at all.  That is pretty much where the similarities end.  Being a cloud based company, Salesforce enforces all sorts of rules and limits on your code. You’ll quickly learn how to be a smarter developer when you have to think about these limits. 

 Salesforce requires that you have 75% coverage on all code you write.  If you fall below this number then you cannot deploy any of the code you have written.  Coverage just means that if you have piece of code that says “hello” you must test it and verify that it says hello.  If not, every line is counted against your overall number.  You cover your code by writing the infamous unit tests.

Rewind to last month and it is really easy to forget or ignore writing test cases.  You can only get away with this for so long before your coverage starts gradually depleting.  After much effort I did a good job addressing a lot of missing coverage.  One thing that became really evident is that I was failing to do a negative test.  A negative test is just what it sounds like.  You pass in junk data and expect a failure.  This proves that your code not only works, but it handles exceptions correctly.  Below I have some sample code that illustrates both a positive and a negative test case.


           static testMethod void testremoveFormulaFieldsSchema()



              //Negative Test of formula field schema

              Map<String, Schema.SObjectField> targetSchemaFieldMap = null;

              targetSchemaFieldMap = removeFormulaFieldsSchema(targetSchemaFieldMap);

              system.assert(targetSchemaFieldMap == null, 'We did not get a null schema ');


              //Positive Test of formula field schema

              targetSchemaFieldMap = Schema.SObjectType.Account.fields.getMap();

              targetSchemaFieldMap = removeFormulaFieldsSchema(targetSchemaFieldMap);

              system.assert(targetSchemaFieldMap != null, 'We failed to get the account schema ');



As you can see above I call the same method “removeFormulaFieldsSchema” in both scenarios but in the first test I am passing null as a parameter.  This will test our code on how I handle exceptions and I expect nothing back after the code is executed.  In the second example I would expect data to be returned to me.  I also included the actual method I was testing for clarity below.  These two tests gave me 100% coverage in my new method and I was a happy person.


       public static Map<String, Schema.SObjectField> removeFormulaFieldsSchema(Map<String, Schema.SObjectField> schemaMap)


         Map<String, Schema.SObjectField>  resultschema = new Map<String, Schema.SObjectField>();




                for(String field : schemaMap.keyset())



                  Schema.DescribeFieldResult desribeResult = schemaMap.get(field).getDescribe();


                  if (!desribeResult.isCalculated())


                    //Field is not a formula field so it is added to the schema.

                    Schema.SObjectField fieldS = schemaMap.get(field); 




                 return resultschema;

              }catch(exception e)


                     return schemaMap;



I hope this helps some apex coders out there to understand the importance of getting your unit test written with your new code.  It was a lot of effort to go back and fix all the omissions but it paid off.  I even found some bugs in the code that I didn’t expect.  Who would have thought that unit testing actually works and isn’t just some evil chore Salesforce imposes on us.


photo credit: <a href="">epospisil</a> via <a href="">photopin</a> <a href="">cc</a>


Turn a Salesforce Hyperlink into a Button:


If you're using Salesforce and have a Hyperlink that uses formula fields, you can make it stand out as an action by converting it into a Salesforce button. Here is what you need to do: 


  1. Create an image of the button and store it as a document
  2. Create a Hyperlink field 
  3. Use the following code to convert the Hyperlink into a button

 HYPERLINK("/servlet/servlet.Integration?lid=01N300000008kgN&eid=" & {!Id} , IMAGE("/servlet/servlet.Images?oid=00D304011111xYG&id=0153111110400F5uW", "Create a New Opportunity"))

Here is how the code functions:


  • The first half of the code builds the link
  • The second half of the code displays the image you created for the button



That's it!


Tell me in the comments how this could be helpful as an admin!





Salesforce Hires Kundra to Expand Overseas

On Monday, Salesforce announced that the recently hired Vivek Kundra is going to be its executive vice president of emerging markets. The goal is to work with international businesses, organizations, and mainly foreign governemnts to move their computer infrastructure spending towards cloud computing. 

"The developed nations are all facing challenges in terms of their financial health... They can look at their operating expenses and see Salesforce as a disruptor" Kundra said. He also added that Salesforce will be seen as a provider of "new services". The overall strategy for this will be developed over the next few months, he said. 

Kundra has an extensive expierience working with governemnts at differnt levels. "When I was in the public sector, $26 billion of [computer infrastructure spending of] $80 billion was in proejcts years behind schedule or not working... The cloud can save money. I've seen it first hand, whether in D.C. or in teh federal government."

Currently, 68% of Salesforce's revenue comes from North America. Another 18% from Europe, and the remaining from Asia-Pacific, Africa and the Middle East reagions