Come stalk me at Dreamforce 2012

*Updated 9/14*
DreamForce 2012 is only a few weeks away. You can still register or sign up for a free pass that gets you access to only the keynote addresses and campground. Free is nice, but you don't get access to all the sessions and trainings and more importantly … the Red Hot Chili Peppers concert.
As this will be my sixth (or seventh?) DreamForce, I've already started preparing by getting some new Dr. Scholls and loading up on Vitamin C, since I'll be on my feet talking away most of the time I'm there. If you want to come see me in action, sign up for one of the following;

The code consultations have got to be the most valuable and under-utilized session. (NOTE: You'll have to have a valid Dreamforce registration and login to use the session links above.) Essentially, you sign up for a half-hour one-on-one with a Salesforce expert; usually a senior level developer or Technical Architect (like myself) from Strategic Services (ie Salesforce's consulting division). Given what our hourly rate is, that half hour alone could cover your registration. I can't tell you how many people sign up and then cancel last minute. The people who have come with very specific, detailed, thought-out questions have sometimes walked away with fully coded solution. (Safe Harbor!) So, if you've hit the wall on some code or can't figure out some integration issue, sign up for a consultation today. Even you you can't pre-register, try swinging by the Developer Zone information desk and asking about cancellations. Odds are you can find a free chair. Maybe you'll even find me.

See you soon.

 

Addendum Sept 5 2012 6PM EST- Apparently the Red Hot Chili Peppers are not the only attraction as Dreamforce will host a free music festival the entire week! Check out the details here. Check out this cool video from The Limousines who will be playing Tues 18 at 6:15. Be there or … don't. I will, though.

Advertisements

Cloud based Data Loader

Workbench_logo
On my Mac, I've historically used Simon Fell's LexiLoader as an alternative to the officially supported yet windows-only Salesforce Data Loader. Though, today, I was running a deletion of a rather large set of records and it was running oh sooooo sloooooow. Now that's probably more the fault of Time Warner Cable than anyone else. (Maybe streaming Pandora at the same time didn't help.) If only there was some cloud-based alternative.

Workbench 1Then I remembered about Workbench. Admittedly, I have not used Workbench since its very early release and at that point I think the hosted version was not yet GA. I had even forgotten that I still had it bookmarked. Well, I logged in today and  *Facepalm* . Why have I not been using this all along?

Now I don't do data migrations very often, but I am constantly looking for details on schema and testing queries. Usually I use Eclipse, but navigating Workbench is so much faster. With the pull down menu I can hit a key and get down to my object faster. Workbench loads fields faster than Eclipse as well. I can also use command +f . I can copy and paste an id from a test query or click on the record to open it in Salesforce. These little oft-used hotkey features are noticibly lacking in the Eclipse version of the schema explorer.

Ever need to get your session id? Its right there under the Info menu. 

Want a web based version of Ant? Check the Migration menu.

It even has utilites for anonymous execute and reseting user password. Probably my only complaint is that the debugging interface for anonymous execute isn't as nice as the new console, but really that's just me being nitpicky.

Go check it out for yourself.

Loginhttps://workbench.developerforce.com 
Doc http://wiki.developerforce.com/page/Workbench

Apex RoundingMode

One of the things that always sends me searching through my old code is rounding. I can never remember the syntax and the Apex documentation on Decimal methods on the Salesforce Developer site doesn't provide any examples inthe description (Its somewhat hidden up in the Divide method description if you look for it) . So, I thought I'd put a few examples here as a reminder to myself and to share with everyone else Googling it. 

Decimal numberToRound = 12.345;
Decimal roundedUp = numberToRound.round(roundingMode.UP); //result: 13
Decimal roundedDown = numberToRound.round(roundingMode.DOWN); //result: 12
Decimal scaled = numberToRound.setscale(0); //result: 12 – no rounding specified, just removes decimal places
Decimal scaledUp = numberToRound.setscale(0, roundingMode.UP); //result: 13 – no rounding, just removes decimal places

Look at the documentation on the RoundingModes for more detail on Ceiling, Half_Down, Half_Up, etc. 

 

 

Salesforce Technical Architect Certification; Part 1 Multiple Choice Exam

Yesterday, I passed part two of the three-part Technical Architect Certification for Salesforce.com. (Step one being the self-evaluation; which really doesn't count given that its free and you can take it repeatedly until you pass.) The third and final step will be a four hour session presenting two cases in front of a live review board of technical architects. I've got a few months to prepare for that. So, in the meanwhile, I thought I'd do a bit to help anyone who might be prepping for the exam while its still fresh in my mind.

1. Find out what you don't know

When I went through the self evaluation, I wrote down the terms that I was less familiar with and made a point of researching them afterwards. This was helpful because a lot of the study resources listed below will assume a certain level of knowledge and make reference to terms without necessarily defining them for you. Though I've been an architect and working with Salesforce for several years, I didn't come from an EAI background, so I wasn't as familiar with industry jargon like Enterprise Service Bus (ESB) or Execute, Transform, & Load (ETL) as they referred to integration and middleware. Honestly, I only first heard the acronym EAI last week and I had to go look it up. 

So, if you're stronger on the functional side get familiar with Apex and Visualforce to the level where you can define an Apex abstract class and explain how it might differ from an interface. If you are a developer, make sure you know what can be better done with configuration (Declarative) vs code (Programmatic). In the majority of cases, the former will be preferable to the latter. In that same vein, understand when it is better to use synchronous (web service) vs asynchronous (outbound messaging) callouts. If you don't have a background as a network admin, understand proxies and firewalls and how they might need to be configured to successfully allow salesforce to connect to internal systems in the DMZ (also know what that term means).

Personally, I had little direct experience working with SSO, Large Data Volumes (LDV), REST API, and Heroku. So I put a little more focus on those areas.

Learn the differences between three types of SSO available to Salesforce - delegated authentication, SAML, and Oauth – and when using an appexchange partner like Ping Identity might be appropriate. The comparison matrix here was very helpful to that end.

The most important thing about LDV was knowing the line of demarcation; 2 million records or greater. Next understand what it take to import that volume of data. Also, familiarize yourself with skinny tables and know that in some cases you'll need to de-normalize data or create external id fields (which are indexed) for reporting and performance. Lastly, know when to question if importing the data is even the best approach – does it need to be used for reports or processes in Salesforce (ie workflows, escalations, etc) or can be be accessed on demand via web service callouts or mashups. 

Know the difference between Soap, Rest, and Bulk API's and which situations call for each. Also understand the methods for securing inbound API calls and how an external system might verify that an outbound message or callout came from Salesforce – certificates, 2 way SSL, ip restrictions, trusted ips, remote site settings.

2. Dive in

I was fortunate enough to have access to some proprietary webinars and study materials that I can't make publicly available. However, if you are a Salesforce partner look into getting access to the study group in the Partner Academy. Otherwise, if your Salesforce org has paid for Premier Training there are some self-paced technical architect courses available in the online catalog- https://help.salesforce.com/apex/HTTrainingCatalog.

The following is a list of publically-available material that I reviewed prior to the exam. 

http://certification.salesforce.com/Architects

http://wiki.developerforce.com/page/10_Common_Mistakes_Architects_Make

http://wiki.developerforce.com/page/CRC:PlatformArchitecture

http://wiki.developerforce.com/page/CRC:PlatformGovernance

http://wiki.developerforce.com/page/CRC:OrgArchitecture#Force.com_Org_Architectures

http://wiki.developerforce.com/page/CRC:IntegrationArchitecture

http://wiki.developerforce.com/page/Integrating_with_the_Force.com_Platform

http://wiki.developerforce.com/page/CRC:DataArchitecture

http://wiki.developerforce.com/page/CRC:SSO

http://wiki.developerforce.com/page/Single_Sign-On_for_Desktop_and_Mobile_Applications_using_SAML_and_OAuth

http://wiki.developerforce.com/page/Single_Sign-On_with_Force.com_and_Microsoft_Active_Directory_Federation_Services

http://www.salesforce.com/us/developer/docs/ldv/salesforce_large_data_volumes_bp.pdf

http://wiki.developerforce.com/page/DeveloperCoreResources

http://wiki.developerforce.com/page/Architect_Core_Resources

http://bobbuzzard.blogspot.com/2012/02/certified-salesforce-technical.html

3. Exam Tips

The exam itself is 60 questions and 120 minutes long. So, you can't dwell too long on any one question. If I didn't know some of the people who wrote the questions, I would swear some of them were written by lawyers. (I kid because I love.) In all seriousness, there are some questions where you may need to just pass and move on. If you read a question more than two times and find yourself going for a third, just flag it for review, select a random answer, and move to the next. Don't sacrifice five questions you do know for one question that you might. My strategy was to do a first quick pass through the exam and tackle only the easy low hanging fruit. Then I did a second pass on those I had flagged for review (a little less than half) with a better sense of how much time I could afford each. 

The questions follow your typical standardized testing format, in that, of the answers given, one is egregiously incorrect, another is incorrect because of some slight twist in phrasing and of the choices remaining one is better than the other. There were only a handful of questions where the correct answer jumped out at me. In the cases where it didn't, I identified the incorrect answers first and then evaluated those that remained. From what I recall, about the majority of questions were evenly split between selecting a single answer and two. Only a handful required selecting three. You don't get credit for partially correct answers so do give those a bit more time.

 

Good luck.

 

Added May 16, 2012 – Continued in Salesforce Technical Architect Certification; Part 2 – Review Board

Quicker Salesforce Setup with Greasemonkey

I’m currently the technical architect on a huge Salesforce project in the UK. How huge? 108 custom objects, 338 Apex classes, 22 components, 59 triggers, 152 VisualForce pages and growing.

You can imagine how frequently you’d be updating custom objects, checking their layouts, field security etc. You click setup, create, custom objects, scroll up and down the list till you find it, click on the object, scroll up and down to find what you wanted. Exhausting. Thanks to Tim Dupont over at Reside for turning me onto a much better way.

He uses a GreaseMonkey script that inserts Custom Objects as a top level node on the App Setup tree. That combined with the new quick find feature, makes getting directly to what you want to edit quick and easy. Script can be found at http://userscripts.org/scripts/show/95361 I wish it also worked for classes and pages and such, but I’m usually doing that in Eclipse anyway.

Quickobject

Additionally, I found a suggestion by TehNrd for another script so that you only have to mouseover your name to see the setup menu rather than click. Get that one at http://userscripts.org/scripts/show/87406

DIY – Make your own Ipad 2 smart cover

Spk-a0421_glam004 I just got a brand new Ipad 2 from my job. While it’s not something that I would have gone out and bought on my own, I have to admit I really like it and its become a very useful to scan incoming emails, IM’s, and Chatter posts while I’m more focused on coding on my Macbook. Having a second ‘screen’ has really helped reduce the interuptions those messages can cause.

Given how scratched up my Macbook Pro has become, I was determined to keep this new toy in pristine condition. So, the first order of business was a cover. I liked Apple’s smart covers but they cost quite a bit ($36 – $63) for something that only protects the front screen.

I wanted a portfolio style cover that was a thin as possible. (Why add bulk to something that’s biggest selling point is how slim it is?) I checked out a few options and finally selected Speck’s FitFolio for Ipad 2 at J&R ($40). It hit all my requirements and had a nice red leather texture that didn’t feel cheap. The only downside was that it didn’t have the smart cover feature; where the ipad turns on/off when the cover is opened/closed.

Now in researching these covers I learned that the smart covers just have a small magnet embedded in them to accomplish this functionality. So the diy’er in me though, “how hard could that be to add to my case?” Apparently, its so easy that it’s taking me longer to write this post.

IMG00041-20110711-2339 Thin magnet and my white ipad 2.

I grabbed a small fridge magnet; the thin kind that you can bend in your hand and could easily cut with a scissor. The thinner the better. The sensor on the Ipad’s bezel that turns the device on/off when a magnet covers it is about 2 inches down from the right hand corner (with the camera being the top). The easiest way to find it is to place the magnet on the bezel and move it around until you find the sweet spot.


IMG00042-20110711-2339
Placing the magnet on the sweet spot turns off the Ipad.

Now that you’ve found the effective area, move the magnet only slightly until its flush with the lip of the case. (You may want to cut the magnet to fit, but keep it as wide as the bezel. Place glue (or tape if you don’t care about asthetics) on top of the magnet and close the lid. Let it dry. Once that’s done, open/close the cover and you should see a working smart cover.

Installing Force.com Migration Tool (Ant) on Mac OsX

I was trying to run ANT to migrate code between two Salesforce orgs today and realized I hadn't configured the Force.com Migration Tool properly for my new Mac. I kept getting the error; [antlib:com.salesforce] Could not load definitions from resource com/salesforce/antlib.xml. It could not be found.

I already had the latest version of Eclipse installed, which handles the Ant installation for you. You can confirm this by typing ANT-version in Terminal. So, it was just a question of getting the migration tool in the Ant lib directory. (This took me a bit of searching hence this quick post).

  1. Download the Force.com Migration Tool (instructions here).
  2. Unzip the file
  3. Open a terminal window in the directory of the unzipped file (See my last post for a quick way to do this)
  4. Type: sudo sh
  5. Enter your password
  6. Type: cp ant-salesforce.jar /usr/share/ant/lib/ant-salesforce.jar

Now you're good to go. Check out Jeff Douglas' blog post on the hows and whys of this tool.