Skip to main content

Search

Run workflow against item in sublibrary

Comments

1 comment

  • Christof

    Hi Gareth Jayne

     

    With this javascript code you get the current selected items in a list view:

    SP.ListOperation.Selection.getSelectedItems()

    I don't know the exact handling of it, when more than one list view is on your form...

     

    With this code you get the id of the first selected item:

    SP.ListOperation.Selection.getSelectedItems()[0].id

    You have to handle anyway the non-selection and the more-than-one-selected-item case.

     

    Another idea is getting the selected row by the css class .s4-itm-selected:

    var idAttr = ArdeviaJQuery(".s4-itm-selected").attr("id");
    return idAttr.split(",")[1];

    But first approach seems to be a more pretty solution.

    0

Please sign in to leave a comment.