Archive for July, 2008

Keeping on top of job changes

Thursday, July 31st, 2008

Keeping data in a CRM up to date is really hard work. One of the things that happens all the time is that people change jobs. Whenever we hear of a job change, we go to Salesforce.com and record it.

Recording a job change is a two-step process:

  1. Edit the Contact record to show the new place of employment and other details that have changed.
  2. Record the fact that this person used to work at their original place of employment–that’s good history you don’t want to lose.

To speed things up, and make sure we don’t lose that history, we created some VisualForce to make recording Job Changes a snap. Watch the video:

We use it every day and we love it. It’s a task-based UI that really nails what it’s trying to do. VisualForce seems amazingly suited for these kinds of streamlining tools–they are relatively easy to create and maintain.

Dave Manelski took this on as his first VisualForce project and he did a great job! After he was done I decided that I wanted to put the email, phone and address fields so the user could change that data in the middle of the task. Because of the architecture of VisualForce, it was a snap. It took about 2 minutes to add those fields, have them editable and have the data land in the right place.

Troubling

Thursday, July 31st, 2008

Just heard from Al queda expert Lawrence Wright that in 2001 the FBI had 7 agents who spoke Arabic.

Today it has 8.

This in light of the conservative RAND Corporation’s report that most terrorist groups have ended by either entering the political process or through law enforcement actions.

Good luck with that law enforcement while not speaking the language.

Rolling up the sleeves with VisualForce

Thursday, July 31st, 2008

I wrote the other day that VisualForce was the real deal. I wanted to follow that post up with some more thoughts now that we’re actively developing with it.

First, let me say that we are trying not to write any S-Controls anymore. One reason is that S-Controls have a shelf life baked into them. At the top of my S-Controls I include Saleforce’s AJAX toolkit, which is what makes them so powerful. But, a bunch of my code was still using an old toolkit (circa way back in 2006) that is no longer getting updated. That’s fine with me–all my new development was always with the new toolkits. But, when Firefox 3 came out, all my code with this very old toolkit broke because of something with Firefox. I have no idea why, but it did.

With VisualForce, there are no includes of files that will go obsolete. So it is the most future-proof way to build UI in Salesforce short of hosting everything yourself.

Second, after spending years building S-Controls, VF is a dream to work with on so many levels. In that earlier article I talked about the big architectural reason why it’s better. Some practical realities have hit home since I’ve been writing actual production code.

  1. Testing is the gift that keeps on giving - UI that I write with VF has all it’s logic in Apex classes. I can write tests for these classes. Testing is massively helpful in creating, understanding, and maintaining code. I can’t overstate it’s value.
  2. Deployment is getting much easier - moving code around has massively improved with the new metadata api. Just yesterday I dragged-and-dropped VF with Apex classes from a sandbox into production. It just plain worked. I was shocked, but it shows how much implicit respect I have for the Sf.com development team that I even tried it. I find myself constantly trying things that I know probably won’t work, and very often things just work! Kind of like using an iphone in that way.
  3. Fewer languages is better - All my logic is now in Apex. So I don’t have to remember how to write logic in S-Controls. Thank god. In some cases we had moved some of the logic from S-Controls to Apex webservices. Migrating this code to VF and Apex turned out to be really easy. And ditching the webservices simplifies and speeds up everything, of course.

So every new idea we have is going right to the VF drawing board. However, there still are some things to improve:

  1. Invoking code - you can’t hook VF into buttons as easily as S-Controls, so we’ll be putting URL calls in there until we can directly reference the pages. Nice thing is that we reference by the page name and not the ID.
  2. List buttons - there isn’t any way to have a list button written in VF process many checked records from a list. So we’ll have to keep writing JavaScript for these functions.
  3. Detail of a record in edit mode - See my idea from yesterday for this killer platform feature. I think this is a massive one for the user experience and would really compliment Apex triggers with UI based “next actions.”
  4. Packaging - I’m sure this will come in the next release.

As we get more proficient with VF (and testing VF) I’ll write more. But to date, I have to say I’m very pleased with the framework. This is a learning curve well worth climbing.

Race Report: Lactic Edge Sprint Triathlon

Thursday, July 31st, 2008

Lactic Edge Sprint Triathlon, Steven’s Point, Wisconsin

A week after the Wautoma tri we made the hour drive further north to Steven’s Point for the 19th annual (just missed the big round number) running of the Lactic Edge Sprint triathlon.

Fresh off my first podium appearance I wanted to do well but suspected I would be outclassed. Steven’s Point is a bigger town with a university, the race was on a Saturday, and it was an established race.

It turned out to be larger, but more loosely run than our previous race. It wasn’t chip timed, and it wasn’t the standard sprint distances, clocking in with a 500m swim, 18 mile bike, and a 3 mile run.

We swam in the Wisconsin river, which was wind-whipped and tamarack stained. You couldn’t see the bottom, even in 6 inches of water. The swim started up-wind and up-current, which wasn’t the most pleasant experience I’ve ever had. I self-selected into the elite wave, not knowing if I was seriously over estimating my relative speed.

Lactic Edge Triathlon 2008

I hit the bike somewhere in the middle of the pack of my wave. On the relatively long bike leg, I got passed by about 4 guys. Again, I’m a slow runner, so I knew I wasn’t going to pick up places on the run. But I only lost two positions. One of the guys who passed me was Brian, the guy I passed in the Wautoma tri. Way to get me back!

The finish was a real joy. I was very happy to be done racing and I crossed the line with my kids, Malcolm and Louise, which was really fun. The crowd cheered for them and they were all smiles!

Lactic Edge Triathlon 2008

I ended up 2nd in my age group and 18th overall. Prior to the Wautoma race I’d never cracked the top 10 in my age group, so I was really happy. I won a beer glass with the race name on it!

Overall Place: 15
Age Group Place: 2
Overall Time: 1:22:53.6
Swim: 7:42.9
Bike: 50:59.4
Run: 24:11.3

Lactic Edge Triathlon 2008

While I look incredibly tired, I want to contrast that with this shot of my wife looking like she’s having the time of her life.

Lactic Edge Triathlon 2008

Well, it turns out she was having a blast! Beth had a great race, finished very strong and experienced some great camaraderie along the way. Hopefully we’ll do more triathlons together soon. I want to thank my parents for bringing the kids up for the race–it was really fun to have a cheering section!

Idea: Allow VisualForce Detail Page to be an edit form

Wednesday, July 30th, 2008

screenshot

screenshot

I would like to create a VisualForce page to override the Edit page for my objects. I can do this now, but I have to build the form by hand. Please enable the “Detail” component, which renders the correct page layout for the object/profile combo, to be put into edit mode.

This would be incredible, because I could then put a conditions-based redirect after the save action to send my User to the next action. This could be:

* a page for next steps on a recently won Opportunity
* a page outlining research steps for a newly created Account

This is a very powerful platform feature I’d love to see!

Force.com blog from Sydney, AU

Tuesday, July 29th, 2008

I just got a note from John Rotenstein announcing his blogging efforts around his Salesforce.com work. Always nice to hear a new voice, especially someone who has applied his Salesforce.com love all the way through to his blog skin.

John also brings up the valid point that Summer ‘08 is really Winter ‘08 for Australians. To address this, I think the next release of Salesforce should be called “Salesforce 98.”

John’s take on the Half Ironman

Tuesday, July 29th, 2008

He felt the full weight of middle age shake his exhausted frame as the fog poured across the muddy blanket of ground his feet were soaking on in the early morning haze. The attendant marked his wife, first on the upper arm, then on her lower calf making sure to caress her flesh with meaty paws that deliberately stroked his love a little harder than necessary for the benefit of the onlookers. In the midst of the confusion, he ran into a childhood friend. They embraced, not knowing when their paths might cross again. The embrace reminded him that life was coursing through his body, if only to soon be tested in a way that it had never been tested before. The muck of the wet ground added to the stench of slaughter and decay coming from the makeshift toilets all the gape eyed men and women were clamoring to use before they submitted to the pain and anguish that they all had hoped to avoid but knew was on the horizon in the hours to come. As he turned to walk to the edge of the icy water to see her wife herded into a bitter cold bath along with a torrent of writhing bodies, he thought he might be in hell.

While I was in Wisconsin doing triathlons, I ran into my old friend John West. He’s a writer, and has detailed his race experience with a scholarly treatise on the dark underside of the Ironman movement.

Great to see you John!

Ain’t Right

Monday, July 28th, 2008

Thanks Tate!

Copy and Paste Page Layouts

Thursday, July 24th, 2008

The Force.com IDE and the new metadata API have enabled copy and paste moving of Page Layouts. Here’s a quick movie showing just how easy it is:

Race Report: God Bless America Triathlon

Thursday, July 24th, 2008

Things have been pretty quiet here as I was on vacation for much of the month of July. I put work completely out of my mind (well, almost completely, more on that later). But I didn’t put triathlon out of my mind–I did 3 races in 3 weeks!

Here are some things I learned:

  • I’m better at short races than long ones
  • 55 degree water doesn’t really bother me
  • Once you try a singlet, you’ll never go back

Here’s my first race report.

God Bless America Super-Sprint Triathlon, Wautoma, Wisconsin

The city of Wautoma, in central Wisconsin, has a population of about 3000, but that probably increases 5 fold in the summer when all the lakes are filled with visitors from the south–mainly Milwaukee and Chicago. We vacationed about 10 minutes from Wautoma, and our visit happened to coincide with the 3rd annual running of the God Bless America Triathlon on the 4th of July.

I surely couldn’t pass up doing a race with a name like that, only 10 minutes from our vacation cottage. So my wife and I signed up for this insanely short race–200m swim (!), 9 mile bike, and 2 mile run.

It turned out to be a lot of fun, and is probably the only triathlon I’ll ever do with a 7 foot tall fiberglass steer in the transition area. About two hundred hardy souls braved the 75 degree water of Silver Lake, and took in the beautiful rolling countryside around the lake.

I’ve never been anywhere near the front of a triathlon. I’m always solidly in the middle of the pack. I’ll paraphrase Joe Friel–one thing you can’t control in Triathlon is who else is going to show up at the race. I’m used to getting my butt kicked by Seattlite triathletes with their $7000 bikes and high VO2 maxes. But this race was on a holiday, in northern Wisconsin, and was crazy-short, so maybe I had a chance to do well.

I can’t really describe what the swim was like. It was over in 3 minutes. I just flailed as fast as I could. I was 7th out of the water and 4th out of transition on the bike. I moved up to second and was a couple bike lengths behind the leader and the motorcycle escort for a mile before he slowly pulled away from me. I ended the bike second overall. Unheard of!

I’m not a fast runner, so I’m used to getting passed on the run. But I vowed that I could go really hard for 2 miles–only 2 miles! I made it about a mile before I was passed, putting me in 3rd place. After the turn around I saw that the guy in 4th place wasn’t far behind me. He caught me with about half a mile left.

But, I didn’t let him go. I stayed behind him and did something I’ve never done before, I passed him back, with about 100m left. I really wanted to place, since I wasn’t sure I’d ever have the opportunity again. I mean, I didn’t want to have to travel to Cutbank, Montana for a race in February or something like that…

Right after I passed him, I saw Beth running out the other way and gave her a high five, even though I was dying. I’m sure that is what kept him from catching me. (He’d have his revenge in a week…)

Beth had a great race even though she hadn’t been training for it. She got really fired up by the racing aspect and remembered how much fun she had in her previous tris.

I ended up 3rd by 3 seconds! I won a sweet t-shirt with a red white and blue eagle head on it, a trophy, and 16 ounces of Heed gel. The race was well-run and a ton of fun. I hope to place in a race again, but I will have to search out the rare opportunities like this one, and hope all those athletes faster than me are at a barbecue or something.

Overall Place: 3
Age Group Place: 1
Overall Time: 41:57
Swim: 3:12
T1: 1:11
Bike: 23:26
T2: 0:46
Run: 13:22 (fastest I’ve run since a dog chased me when I was 10)

God Bless America Triathlon 2008