Quick Tip: Custom Action Tokens in SharePoint 2010 Designer
This post is over a year old, some of this information may be out of date.
SharePoint 2010 Designer allows you to create custom actions for the SharePoint ribbon or the item context menu.

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

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** |
~site | SPContext.Current.Web.ServerRelativeUrl |
~sitecollection | SPContext.Current.Site.ServerRelativeUrl |
{ItemId} | item.ID.ToString() |
{ItemUrl} | item.Url |
{SiteUrl} | web.Url |
{ListId} | list.ID.ToString("B") |
{RecurrenceId} | item.RecurrenceID |
Examples
~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.
Related articles
SharePoint Designer Workflow Action: Retrieve the File Extension
Order List Items Like in a Meeting Workspace: Part 2
Reuse Page Ribbon Actions (PageStateCommands) Outside the Ribbon
Report issues or make changes on GitHub
Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.
Comments
Let's build together
Manage content in VS Code
Present from VS Code