locked
Add Cutom Action in View Ribbon for multiple list items RRS feed

  • Question

  • I have a custom list and I have created a cutom action in View Ribbon which starts a workflow for the list item. When I select single list item thourgh checkbox it gets enabled. But When I select more than one items it gets disabled. I have to make it enabled for multiple items and I need it to start that workflow for all items selected. Please suggest posible work around.

    Thanks in advance for help,

    Raza

    Thursday, May 12, 2011 10:53 AM

Answers

  • Out of the box, workflows operate on a single item only. In fact, many ribbon actions are not applicable to multiple items. This post suggests a workaround using multiple item form.
    AK
    Thursday, May 12, 2011 12:04 PM
  • Hi Raza,

    You can use the getSelectedItems() method in the javascript of your custom action to allow users to select multiple document and start your workflow processing. For example:

    var context = SP.ClientContext.get_current();
    var selectedItems = SP.ListOperation.Selection.getSelectedItems(context);
    var item;

    for (item in selectedItems)
    {
            // perform you item level processing here
    }

    More details can be found here: http://msdn.microsoft.com/en-us/library/ff409526.aspx

    Regards,

     


    Brian C | Blog Site
    Thursday, May 12, 2011 2:34 PM

All replies

  • Out of the box, workflows operate on a single item only. In fact, many ribbon actions are not applicable to multiple items. This post suggests a workaround using multiple item form.
    AK
    Thursday, May 12, 2011 12:04 PM
  • Hi Raza,

    You can use the getSelectedItems() method in the javascript of your custom action to allow users to select multiple document and start your workflow processing. For example:

    var context = SP.ClientContext.get_current();
    var selectedItems = SP.ListOperation.Selection.getSelectedItems(context);
    var item;

    for (item in selectedItems)
    {
            // perform you item level processing here
    }

    More details can be found here: http://msdn.microsoft.com/en-us/library/ff409526.aspx

    Regards,

     


    Brian C | Blog Site
    Thursday, May 12, 2011 2:34 PM