Here is the list of Tokens or paramenters available that you can use. these when used in CustomAction Url are replaced on runtime.
Token Replaced By
~site/ SPContext.Current.Web.ServerRelativeUrl
~sitecollection/ SPContext.Current.Site.ServerRelativeUrl
{ItemId} item.ID.ToString()
{ItemUrl} item.Url
{SiteUrl} web.Url
{ListId} list.ID.ToString()
{RecurrenceId} item.RecurrenceID
and this is how you use it
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="{someId}"
  RegistrationType="List"
  RegistrationId= "{someId}"
  Location="EditControlBlock"
  ImageUrl="/_layouts/IMAGES/DOCLINK.GIF"
  Sequence="1001"
  Title="Click Me!"
  Description="Shows an alert message for this content type."
  >
  <UrlActionUrl="~site/_layouts/CustomPage.aspx?ID={ItemId}&List={ListId}"/>
  </CustomAction>
</Elements>
Ads by Google
No comments:
Post a Comment