Alert This post is over a year old, some of this information may be out of date.

Quick Tip: Custom Action Tokens in SharePoint 2010 Designer

post

SharePoint 2010 Designer allows you to create custom actions for the SharePoint ribbon or the item context menu.

Show image Custom Actions in SharePoint Designer
Custom Actions in SharePoint Designer

These custom actions can be used to start a workflow, navigate to a form, and navigate to a custom URL.

Show image Action Types
Action Types

For the last option you can make use of “Tokens”. These tokens enable you to create a variable URL’s.

The tokens that could be used are the following:

**Token****Replaced With**
~siteSPContext.Current.Web.ServerRelativeUrl
~sitecollectionSPContext.Current.Site.ServerRelativeUrl
{ItemId}item.ID.ToString()
{ItemUrl}item.Url
{SiteUrl}web.Url
{ListId}list.ID.ToString("B")
{RecurrenceId}item.RecurrenceID

Examples

1
2
3
4
5
6
7
~site/ = /demo/CustomAction/SubSite/
~sitecollection/ = /demo/CustomAction/
{ItemId} = 2
{ItemUrl} = /demo/ CustomAction /Lists/Custom/2_.000
{SiteUrl} = http://jtb-sp2010elst2/demo/CustomAction
{ListId} = {59e393f7-3fc3-4408-86f9-6819bbdf6886}
{RecurrenceId} = Not tested

More information about the RecurrenceId can be found here.

Comments

Back to top