I have Document Library that has documents under few folders with documents. This Library has a custom action(placed in ribbon), that will create document set against to a Document with a Designer Workflow.

Problem: When I create document set inside a folder with custom action redirection is happening to the Root page of document library. How to return back to the same folder I was?.**

3 Answers 3


Because of the custom action redirect, then it will redirect to the root page of the document library.

If you want to return back to the same folder, you could click Back button beside the Address bar in IE.


I figured it out with combinations of few solution out there.

basically you have to create Custom Action with navigate URL property and use this URL to Invoke the Workflow Steps are below:

  1. Create Custom Action with Navigate to URL
  2. Enter below URL:

http://yoursite/_layouts/IniWrkflIP.aspx?List={ListId}&ID={ItemId}&TemplateID={Your workflow template ID}&Source={Source}

  1. Done!


To get the workflow Template id you may run 1st time as Initiate workflow option in Custom Action property.

The following tokens are recognized and will be needed according to your requirment:

{ItemId} – ID (GUID) taken from the list view.
{ItemUrl} – Web-relative URL of the list item (Url).
{RecurrenceId} – ID of a recurrent item (RecurrenceID).
{SiteUrl} – The fully qualified URL to the site (Url).
{ListId} – ID (GUID) of the list (ID).
{ListUrlDir} – Server-relative URL of the site plus the list's folder.
{Source} – Fully qualified request URL.
{SelectedListId} – ID (GUID) of the list that is currently selected from a list view.
{SelectedItemId} – ID of the item that is currently selected from the list view.

Sorry for the very late reply. I can't understand this answer. I want to create a Custom Action with URL for a list view ribbon. But following the instructions here, a single, particular item on the list is hard-coded into the URL (the {ItemID} parameter). So the custom action operates on the same item every time, and disregards which item is selected on the list.

I don't understand how this creates a custom action by navigate URL that runs a workflow on any selected item.

Edit: I figured out my problem. I misunderstood that the ID= parameter was literally "{SelectedItemID}", not the ID parameter that appeared in the URL I copied from my Initialization parameter form.

For anyone having the problem:

  1. Create the workflow. Add Initialization parameters in the edit workflow page in Sharepoint Designer.
  2. Create a custom action to run the workflow you just created
  3. When you get to the Initialization page, copy the URL of the page.
  4. Edit the URL you copied to replace the specific &ID= parameter, which will be a specific number (e.g. ID=2 for the second item in the list), with the literal string "&ID={SelectedItemID}" (without the quotes). In my system, the URL also contained a parameter &ItemGuid={...GUID of specific item selected...}. Delete this whole parameter from your URL.
  5. Open your custom action in SPD, change it to a "navigate to URL" action and paste in your resulting URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.