My two cents on the Salesforce / Microsoft Mashup


Back in the day (Dreamforce 2010) there was a full blown nerd version of sharks vs jets going on. Benioff said choice words like “”There’s an old industry … and they’re trying to do everything they can to stop this,”” . Fast forward to now and the big news is Microsoft and Salesforce are partnering up.



Literally, my eyes were like this

I have been chewing on this news for a week now and figured it was time for me to weigh in.

1)      This is great news for both companies. Salesforce is sometimes not exactly treated as a full on enterprise app, and Microsoft doesn’t always have the best reputation. By par   tnering with Microsoft, and by proxy SQL and inhouse data, Salesforce gains some legitimacy with old skool IT folks. Microsoft gets access to some of the most loyal geeks around (#wetweetalot)

wonder twin nerd powers activate

Old Skool IT & #ClicksNotCodeFTW

2)      This is great news for both companies (Sales). Having a better integration to Outlook and Excel, which, let’s be honest here are still the most prevalent CRM, breaks down the barriers to entry for Salesforce. By having a tighter integration to Salesforce, Microsoft plays a long game against other communication / app companies that a business might be tempted to look at. In otherwords, Microsoft is going to make more money keeping businesses in tight with Office then they will with Dynamics.

3)      This is great news for admins. I really don’t like the outlook integration as it stands now and part of that is outlooks fault. If it becomes less “installed after thought” functionality and more “Click and Work” functionality, then I have happier coworkers.

So, who are the losers in this deal?

1)      Any CRM provider not named Dynamics or Salesforce. I would be shocked if some sort of connector for Dynamics to Salesforce isn’t released, which will help Dynamics with CRM and Salesforce with ERP. The “Magic Quadrant” for CRM is already DOMINATED by the two companies, this will only keep that dominance rolling.

SAP being in the magic quadrant shook my faith in humanity

2)      Any software guy who’s last name is Ellison. Really though, the dude doesn’t worry. Oracle has so many fingers in so many pies, it is nuts. Though, Ellison does tend to try to buy out companies he finds intersting / a threat, so there is that. Like the saying goes, “No one ever got fired for buying Oracle”…Err, take that back, someone from the State of Oregon might be fired (or at least talked to in a stern voice).

Enjoy your cubicle.



Overall, I am excited to see where this goes.

One (Flow) field to rule them all


I love it when in the course of an average day you have that moment when the light bulb gets turned to on, the heavens part and there in front of you is something new and exciting.

Image This is how my light bulb moments look, don’t judge me

For example, I was building out my clone user flow for #salesforce1selfies and started thinking about how I had my search page set up. It was fairly standard with a text box where I would enter in a user ID but like Freddy Mercury, I want it all.

I wanted to be able to search on name,email and user ID and I wanted to do it from within one text box.

Image“One field to rule them all, and in the flow logic bind them”

Really, it sounded pretty simple, but then again, you can sum up the lord of the rings trilogy by saying it was just about taking out the trash.

“All we have to do is throw the ring away, easy – peasy”.Image


Actually, it was easy…I mean, this was something I did while on my first cup of coffee. I started with my flow Mirepoix, input screen, query, output screen.

ImageIt’s just the base! You have to liven it up yourself!

To that base, I added in a decision with three outcomes:


1)      Input Text “Starts With” “005”


2)      Input Text Contains “@”


3)      Else assume text is name


These outcomes are each linked to a unique query and assignment:

1)      Input Text “Starts With” “005” –> Query ID with Input Text –> varMatchType = “UserID”


2)      Input Text Contains “@” –> Query Email with Input Text –> varMatchType  = “Email”


3)      Else assume text is name –> Query Name with Input Text –> varMatchType  = “Name”


I put the varMatchType on as a visual debugger because I only have one output screen and I want to be able to see visually how I got there. Image

Fun and games aside, how does this work? Well, it works great! Here are some screen shots to prove it:



I would like to think it is because of my super ninja / bow / stealth / flow skills, but the reality is this is just a really good piece of functionality. I really like the potential here. Imagine creating one flow that does this type of analysis and routing…you could use it all over the place!

Hope you enjoyed this…questions or comments, let me know!



Making a Dynamic Choice That Much Better


Let’s say that you are writing a flow and at one point you are going to prompt your user for some data that will then be used to populate a dynamic choice field.

Tell me hot shot, how do you handle just one single record?Do you make your user select one and then click through, or is there a better way?

Image “Can I choose not to do Matrix 2 and 3?”

Well, the good news is, you can make a smarter dynamic choice flow. By using some logic and a couple queries, you can choose to display the dynamic choice or bypass it. The reason we can do this is because instead of checking to see how many records are returned, we are just going to check to see if there is more than one. 

The example I am going to use takes a user input of “Last Name” and will check to see if there is ONE or ONE+ records and then determines if the user should see the dynamic choice page or a generic page displayed to the user.



1)      Query1 is based on the user input. ID of the first record is passed to a variable (VarID1)


2)      Query2 is based on the user input AND the ID cannot equal VARID1

3)      The results of Query2 is passed to a variable (VarID2). This variable has a default value of zero

4)      Decision point evaluates VarID2 and if the variable DOES NOT equal zero, the dynamic choice screen is presented. Default outcome (in this case) is just a display screen.


5)      Take the rest of the day off (just kidding)

I wish there was more to this, but it really is just a nice piece of logic and the fact that your user doesn’t have a click gate if there is just one record returned will probably go unnoticed, but you will know the truth!


EDIT! This blog post really covered this on a high level. If you want a blow by blow account, head over to my buddy Rakesh’s blog…


using a formula field to generate random numbers in Salesforce


In the course of getting “Project X” on the road to AMAZING I had to figure out how to get a random number out of salesforce. Since I am not a coder (Clicks not Code FTW!) I went through the formula documentation on success.salesforce and could not find anything like the excel function “random”. The google machine had suggestions, but they were all code driven. This is an interesting post as well. (

So, what’s a poor admin to do? Well, if option A doesn’t work and option B is not going to work, this admin gets out his thinking cap (Seattle Seahawks throwback, btw) and gets to work.

First, I had to think about what I was trying to do. Am I really trying to make a random number? Do random numbers exist at all? The truth is, I can give you random numbers all day long and more than likely, you will find (or think you have found) a pattern. Humans are exceptional at doing this, and it has been theorized this helps with the whole Fight or Flight instinct (Is that the bushes or is there really a tiger there?).The lesson here is that as long as the user thinks it is “random” it can be called random.

Thus, properly aligned on this concept, I go off on my merry and random way and cooked up a solution.

Now, before I go into pure SFDC formula awesomeness mode, I want to call out that this is probably my 50th iteration (maybe slight exaggeration) of this functionality. BUT, I want to also call out that Salesforce is probably the best platform I know of for this type of work. Quite literally, I would have the tab view up on the screen and in a new chrome tab the formula field for constant tweek / refresh. So, back to the awesomeness.

I decided that I will need two things to get my random number:

1)      A pool of numbers

2)      A “dice” function

To generate the pool of numbers, I decided to use the NOW() function along with the square root function. The NOW() function gives me an ever changing value and the square root function gives me a way to expand on that changing value. At first, I tried using just the minute function to get my pool, but ran into issues because the numbers were quite large enough. That is not to say it wouldn’t have worked, but it just didn’t make me happy. Then, around PI day (3/14) I had an inspiration! I remembered that there were certain sequential dates that only occur once in a millennia like “11/12/13”. I already had a really REALLY good seed, the date itself. This is because NOW() returns Month/ Day/ Year Hour / Minutes / AM PM. That might be a bunch of text, but if you break it down a bit more, you will see where I am headed:

NOW() = 3/19/2014 9:25 AM = 3192014925 = 31920141625

That last value might look a little funny and that is because it is. I noticed that when I ran a formula to derive hour from now <(left(right(text(now()),9),2)))> the return result was actually not matching with what I saw. Turns out, the hour value was being formatted into 24 hour UTC.

Deep Breath! With all this said, what I have is this great formula that returns a number that WILL NEVER HAPPEN AGAIN (Kerplew, Mind Blown and it is only Thursday) and can now work my random magic on it, and by magic, I mean the square root function.

The reason I use this function is because, well, it generates a gnarly set of digits. According to the Wikipedia page, “In mathematics, a square root of a number a is a number y such that y2 = a, in other words, a number y whose square (the result of multiplying the number by itself, or y × y) is a.[1] For example, 4 and −4 are square roots of 16 because42 = (−4)2 = 16.”, in other words, for every number, this is another number that when multiplied against itself will return the first number.

Thus, I get the following number formula with 9 digits after the decimal:










There are a couple things I need to call out:

1)      I put the “/100” in there because the returned number was so large and the differences (minutes) so minute (ha) that the square root function was not returning really good results. Once I threw that “/100” in there, I started to get much more amazing data.

2)      The order of operation starts with the minute function. This is to keep things more random. Basically, if you started with the Date values, the leading digits would be the same for 24 hours. This way, they are refreshed every minute.

Now that you have a pool of numbers, you would need to generate your “dice” criteria.

The dice is what selects from the pool the actual number. In excel, this is similar to the “RANDBETWEEN” function. I put together a quick dice criteria in excel so that I could demonstrate the randomness. It uses a combination of the length of the user’s first name & the numerical position of the first letter of the first name. What this means is that ANDREW = 6 digits and A = 1, so my “dice” number is 6-1. IF my first name was BART, then the “dice” formula would be 3 (BART = 5 digits and B = 2). I used this “dice” formula on my pool results, and for it being a thrown together criteria, I did see some very nice and random results. Unfortunately, chatter posts are not very nice with formatting that data, so you would need to look at the attached docs!

And thus, with this knowledge, you will be on your way to generating your own take on this, which is what will truly make your number random! Now, was this all just for fun? Nope! One possible application for this could be for the assignment of incoming records like leads or cases where you might not want a round robin or first in / first out rule setup.


Thanks for playing along! If you like this, be sure and share. If you have questions, well, let me know!

Russell Wilson, Football, Baseball and Salesforce


The Seahwaks second year quarterback is Russell Wilson. Russell has a great story that builds up to my point, so bear with me. Russell walked on at Wisconsin and ended up leading the team to the Rose Bowl, not to out the ordinary except that Russell wasn’t even the starter when he got to Wisconsin. Russell was then drafted in the 5th round by the Seahawks, shocking a lot of people because he wasn’t built like your typical quarter back (5’ 10” instead of a typical 6’ 4”). His rookie year he won the starter job from Matt Flynn, which surprised just about everyone but his mom, and even then, his mom was only surprised at how quickly it happened. This year, the Hawks are 11-2 and have clinched a playoff spot. Despite all this success, the Ranger’s just announced that they drafted Russell in the 5th round of their rule 5 draft. Just to be clear, the Rangers are a Major League Baseball Club.

So, the question is “why”. Why would a baseball club spend a draft choice on a very successful football player. The answer provided by the Sports Illustrated section “Audibles” provides a very clear explanation:

“Because Wilson was taken in the AAA-level section of the draft, the Rangers can stash him on their roster, in case he ever stuns the football world by bailing for the diamond.”

It is all about stashing talent, kind of like a rainy day fund for sports.

Like the Rangers, are you stashing any thing away for a rainy day (Ideas, not Athletes!). Is it that crazy idea you have around workflows, perhaps it is documentation or that great thread you found about visual force? Perhaps it is a tweet? I don’t know what is in yours, but I know that I have a very full clever ideas / awesome insights / cool tips rainy day fund that I am looking forward to sharing. 

When working with Cloud Apps, in my case it is, tinkering almost seems to be encouraged. There is a very open community of folks who share ideas and are consistently driven to find new and better ways of doing things through new tools and features.

My Intellectual Property rainy day fun spans quite an area, from business to marketing and back to Salesforce, but I feel that having a well-diversified portfolio helps when it comes to real life an intellectual capital.

–      Andrew