Testing

webTiger Logo Wide

SharePoint Designer Hints and Tricks

SharePoint 2013 Logo

Here’s a summary of some of the hints and tricks I’ve picked up while working with SharePoint Designer 2013 (SPD). Some are to fix issues that SPD introduces itself, and others are just things to make using the tool a little less painful.

Clearing Caches

By far, one of the most common issues you’ll come across when using SPD is sites/workflows failing to load into the developer tool properly. This is nearly always a caching issue (as SharePoint (SP) assemblies, workflow files, etc. are cached locally to save load times on subsequent requests).

If assembly versions go out of sync or files become corrupted then it can cause a myriad of load issues. Fortunately, it is fairly easy to clear the caches. Simply go to each of the folders and delete the contents:

  • %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
  • %USERPROFILE%\AppData\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache
  • %USERPROFILE%\AppData\Roaming\Microsoft\Web Server Extensions\Cache

Here is a little snippet that can be saved to a batch file (e.g. SPD_ClearCaches.bat) and run as and when required:

@echo off
@echo Make sure we are targeting the C:\ drive...
C:
@echo Done!

@echo Clearing websites cache...
RMDIR %LOCALAPPDATA%\Microsoft\WebsiteCache /s /q
@echo Done!

@echo Clearing assembly cache...
RMDIR "%APPDATA%\Microsoft\SharePoint Designer\ProxyAssemblyCache" /s /q
@echo Done!

@echo Clearing web server extensions cache...
RMDIR "%APPDATA%\Microsoft\Web Server Extensions\Cache" /s /q
@echo Done!

@echo ALL CACHES CLEARED!
pauseCode language: DOS .bat (dos)

The ‘pause’ command is optional but I find it useful as it stops a command line prompt that was opened to execute the batch file automatically closing again afterwards.

Making People Picker Values Readable on Custom Display Form

This is a fairly simple one to achieve. First you need to have a custom display form (e.g. create a new form for the list called something like DispItem.aspx and make it the default). Then you need to edit the form in advanced mode, and find the table row for the field you want to update. Then simply add a disable-output-escaping attribute to the XSL tag:

<xsl:value-of select="@SendTo" disable-output-escaping="yes" />Code language: HTML, XML (xml)