CSOM and Office 365 - A Broken Home

So in an effort to blog more and focus on life outside more I have deleted facebook and twitter from my phone & tablet iDevices.  This will be the first of many blog posts on mosslover.com again related to SharePoint, mobile, and other things.  I am hoping I can cultivate my blogs again.
So this week I have been working with JSOM (Javascript Client Object Model) and SharePoint 2013.  I was trying to find the best page for JSOM information and it took forever to search for the right MSDN article.  To help you guys out here is a list of all the variables: http://msdn.microsoft.com/en-us/library/sharepoint/jj246996.aspx.  Some of you maybe know the location of this secret file and some of you may thank me later.  I understand the hassle.
The next thing I did after finding this secret article involved finding the URL variable for the Edit Form Field which is located here: http://msdn.microsoft.com/EN-US/library/sharepoint/jj246892.aspx.
At this point in time you are singing "We Are the Champions" and contemplating the beer you will be drinking later on in the day.  Then you go in and drop this line of code into your js file: "myList.get_defaultEditFormUrl()".
You drop in a context.load and an ExecuteQueryAsync and you think you are done.  Then you load the file in Office 365 and a property is not loaded pops out at you.  That's when you pop out the IE Developer Toolbar and start debugging.  Your list is completely loaded, your fields, and your items, but this one property will not load, despite the correct syntax.  It gets to be about 6 pm in your day, one hour past quitting time, and you realize it's about time to stop.  You even went to the trouble to open all the js files in the hive without luck.  So the moral of this story is that sometimes things don't work in JSOM, despite what you think they should do.  That's when you have to do the thing you dread and hardcode in the list url partially.  I hope that this helped someone learn that this property is like a carrot dangling in front of a rabbit that keeps getting raised higher and higher.  Have a good night guys!

Print | posted on Tuesday, August 27, 2013 6:09 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © MOSSLover

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski