SharePoint Client Object Model: Step One

I almost didn't make it out alive.  I followed the instructions in every piece of sample code and every forum post by someone who had no idea why their client OM code wasn't working, and my code still wouldn't get past the page load.  I kept getting "'Type' is undefined" errors when sp.core.js tried to register the SP namespace.

As it turns out, you need the help of the default master page (or one like it) to get the object model loaded.  Once I told my sample page to use the default master and modified everything accordingly, it hooked up and ran just fine.

Now I can finally get some work done.

No Comments