Category: Sharepoint Designer 2010

Clearing Sharepoint Designer Cache

Many times sharepoint designer gets stuck/ Considers checked out files as checked in or vice versa.

In most common scenario you’ll see a message like “Cannot perform this operation. The file is no longer checked out or has been deleted.” while checking in a file.

The solution is to clear all the cache that SharePoint designer has stored on your machine.

For clearing that you can press Win + R and navigate to these two folders and delete all available files.

  • %APPDATA%MicrosoftWeb Server ExtensionsCache
  • %USERPROFILE%AppDataLocalMicrosoftWebsiteCache

Step by Step guide to Styling Sharepoint Lists/Libraries Using Sharepoint Designer

Many Times there is requirement for Styling SharePoint items like Custom Lists, Document library, Pages etc… so as to Emphasize certain Data over other so that it is noticeable or to present it to end-user in such a way that it doesn’t appear to be a SharePoint listFor this requirement first thing is to identify what will be visible to end user. Is it a list or list webpart in a Site Page because in this approach when you’ll edit the list it will create XSLT on that particular page and won’t be visible elsewhere.

Here we are creating a Custom List ( Sample List).

And Add Few Columns to it. (say Employee Name, Comments, Performance etc…)

Employee name is a Single Line of text, Comments is a Multiple Line of text and Status is a Choice with 3 Values Met Expectations, Under Performed and Exceeded Expectations.

Once we’ve got this in place we will Remove title From Required list

and Modify this view to get the required fields in the view.

Now go to Site Actions and Edit Page in SharePoint Designer (and Then wait for it to load the site which will take long long time). Now on Left Pane select “List and Libraries” and from there Select Your List and Click DispForm.aspx in Main Area.

Sharepoint XSLT Transform Issue

While creating custom form of a list if you have encountered given exception.

Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.
at Microsoft.Xslt.NativeMethod.CheckForSufficientStack()
at (XmlQueryRuntime , XPathNavigator , Double , String )
at (XmlQueryRuntime , IList`1 )
at (XmlQueryRuntime , XPathNavigator )
at Root(XmlQueryRuntime )
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ExecuteTransform(XslCompiledTransform xslCompiledTransform, XsltArgumentList xmlArguments, Boolean bDeferExecuteTransform)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)

in which some time Edit form opens and some time it doesn’t then most probably the issue with your form is too heavy for SharePoint to handle i.e contains a whole lot of fields (here whole lot of can be 50 and above)¬†ūüôā and it is taking more than one second to transform the XSLT.

The best chance you have to avoide this exception is to clean up XSL in the form or remove the controls that take more time to render (like BDC).

To clean up the XSL
1. You can remove the description part of SharePoint controls from your form. It will reduce whole lot of XSLT that you are not using and make your form render faster.
                          The description tag looks something like :

2. Remove the unnecessary datafields sharepoint is fetching and that are not used in the form (be very careful here )

NOTE: If you are getting same exception and form never renders then the reason could also be that you have messed up XSLT at someplace and its stuck. Eg. You have copied and pasted a control some where on page and both controls have same ID like id=”ff9{$Pos}”.

In this case try to recall what changes you made in the page and act accordingly.

Sharepoint 2010 Site Action Menu not working in IE 8/ IE 9 : Permanemt Fix

In March I wrote a post for enabling Site Menu when it is not working in IE 8/9.
That was not a permanent fix and I forgot to update that post with the Permanent Fix.1. Understanding the Issue.The issue we were facing was because the document mode in which IE was rendering the Page was different from the browser mode.2. Fix

Force IE to render in the desired mode. (Same thing we did in previous post, but this time using a meta tag)

To fix this issue :
1.  Edit Master page of your sharepoint site using Sharepoint Designer
2. Find ‘HEAD’ tag ()
3. Add given meta tag just below head tag

This will force IE to open in IE 9 mode. If you have IE 8 as your default document Type then change it accordingly.

For more information on http-equiv attribute you can go through give Hyperlink.