I am adding a custom button to the ribbon's settings area for a list through SharePoint designer. My requirement is When user click on the button user has to navigate to another page with currently selected list view name. Is it possible to grab the list view name that user is currently viewing? Eg. SelectedItemId is giving the item id of the currently selected item. But instead of selected item id i want to get the list view name.
1 Answer
Assuming a simple list in SP 2013 - 2016 (i.e. not the SharePoint Online modern UI), and depending of the view options, the view's name is displayed at the top of the list. Your JavaScript can extract the name, or the view's path and file name.
Screen capture is from SharePoint Online, classic UI...
-
But how i can refer this in my custom action inside SharePoint designer? I don't want JS solution.– MihirCommented Jul 23, 2018 at 17:22
-
Sorry, there's more than one way to create Custom Actions. For a pure SPD only Custom Action, you can only use the built-in placeholders, and none of them include the View name. see here for a list of the URL tokens: (the SPD Custom Action may only support a subset of these) docs.microsoft.com/en-us/sharepoint/dev/general-development/… Commented Jul 23, 2018 at 17:35