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?.**


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.

| improve this answer | |

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.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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