Failed to get value of the “Approval Status”

The full error message reads “Failed to get value of the “Approval Status” column from the “Moderation Status” field type control”. This error has started occuring on document libraries containg web part pages that were upgraded from SPS 2003. The Hidden property on the Approval Status field has somehow been set to false. The Hidden property should be True.

I found this fix. Download a utility called SharePoint Manager 2007 from this site.
Run the application on a SharePoint server.
Go to View – Object Model and make sure “Full” is selected.
Browse to the library in the treeview.
Open the list of Fields and select the Approval Status field.
Change the Hidden property to True.
If the property is already set to True then change it to false and save it. Then change it back to True and save again.


Access Denied With InfoPath Content Types

One of the options for publishing an InfoPath form to a MOSS Forms Server is as a Content Type. When you publish the form, InfoPath asks for a location to publish it. The Content Type is published to entire site collection. When the form template is published to a forms library, the template and the columns in the content type are added to the form library. The form will automatically update the columns that correspond to the content type. The benefit of using a content type is that you can assign multiple form templates to the same form library.

The problem that we ran across was the location selected for publishing the content type. Even though the content type is published to the entire site collection and can be used anywhere in the site, the users appeared to need Contributor rights to the original published location of the content type. So if you published the content type to the a http://site/subsite¬†then the user would need contributor rights to that sub-site or they would get an “Access Denied” when the form was submitted.

The key is to publish the Content Type to the exact location where you’re going to use it and make sure your users have contributor rights. For us it was a forms library.

Add a Document Icon to the CBQ

When you want to change the look of the results in a Content By Query web part you modify the ItemStyle.xsl file in the Style Library of your site. You can find more information here.

I created a custom style to display links to documents. If you are pulling documents directly from a document library, you can make the modifications to the XSL that are documented in this posting.

My custom style is pulling links and titles from a custom list so I needed to get the file extension to generate the icon. Luckily there’s a function in the ddwrt namespace for doing this. It’s documented here.

So now you just need to build the link to the image and link it to the document URL. My variable with the document URL is @DocURL. You should substitute your own doc URL variable. Just add this to your style where you want the icon to appear.
<A TABINDEX=-1 href={@DocURL} target=_blank>
<img border=0 src=/_layouts/images/ic{ddwrt:GetFileExtension(@DocURL)}.gif alt={@DocIcon} style=vertical-align: middle;margin-right:4px />

Using Silverlight in SharePoint

Hopefully more on this soon, with examples. Check out this site with sample web parts. The site includes all of the code and walk throughs.