Archive for Designer

Workflow App Permissions

With the new 2013 workflows there are a few scenarios that can cause issues which may not be obvious to those coming from 2010. One such scenario is configuring list items to have Create and Edit access set to Create items and edit items that were created by the user and have a user who did not create the item initiate a 2013 workflow. By default, this will result in the workflow failing due to unauthorised access exceptions.

Lets walk through the scenario in more detail.

Start with creating a new custom list and then in SharePoint Designer, publish a simple List workflow to it.

Publish SPD Workflow

As you can see, a very simple workflow 🙂

Configure the list to allow users to only edit items that they created.

List Permissions
Read more

Clear Designer Cache

SharePoint Short #9

When using SharePoint Designer, especially in a development environment where content and assemblies can frequently change, SPD can start to behave erratically, sometimes loading content that has been removed from the web site, or using an older version of an assembly. This is due to how SPD caches content, which thankfully, is easy enough to clear.

First, close SPD and then remove all files from the following folder:
%APPDATA%\Microsoft\Web Server Extensions\Cache

This contains things like page caches.

Then, do the same for this folder:

This contains cached items such as assemblies used and lots of other xml configuration files.

Restart SPD and all should be good in the world 🙂

SPD WebPart Definition Code

Using SharePoint Designer, users can update WebPart properties directly via the code pane. Now, if this is a requirement for you, you’ll notice that when editing a custom version three WebPart (System.Web.UI.WebControls.WebParts.WebPart) that the properties are displayed as attributes of the WebPart element:

<webpart:test_webpart runat="server" CustomProperty="custom value"></webpart:test_webpart>

I’ve trimmed the above to make it more readable, the real element would be far longer and all on one line.

To make it easier for users to update properties via SPD and to move the properties to their own child elements, one option available is to make a few changes to your WebPart.

  • Change the WebPart to inherit from the version 2 class – Microsoft.SharePoint.WebPartPages.WebPart
  • Add the SupportsAttributeMarkup(false) attribute to the WebPart class
  • For the property you want displayed as a child element, ensure the property attribute used for storage is WebPartStorage(Storage.Shared) and not Personalizable(PersonalizationScope.Shared). The storage type used is not important.

For example:
Read more


Get every new post delivered to your Inbox

Join other followers: