Monday, May 28, 2012

SharePoint 2010 & Javascript Woes

A quick one today.

I recently ran into a bizarre issue with SharePoint 2010 lists, where even though I'd configured the list to display its display / edit form as a dialog, it was instead displaying it in a new page (ie, replacing the current page). This however only occurred when I included the list as a web part on another page - not on the main list pages.

I noticed that there was a script error being reported on the page when the link to display / edit the list item was clicked, with an error along the lines of "undefined is null or not an object" in either "core.js" or "inplview.js".

Before I dived into debugging javascript files, I decided to compare the web part properties for a list whose display / edit form was successfully being displayed in a dialog (on the same page) with the web part I was having issues with. The only difference: the web part encountering the javascript error had the following AJAX Options selected:
  • Enable Asynchronous Update
  • Show Manual Refresh Button
When I disabled these, the javascript error went away, and the display / edit form was displayed in a dialog as expected. Fortunately I didn't need either of these options

1 comment:

  1. I've been troubleshooting a similar problem (inplview.js) on some code I inherited all morning and found your note and it completely resolved my problem. Thanks so much!!!