Forum Discussion
Jason Hopp
Apr 09, 2018Brass Contributor
Redirect User based on List
I have a menu item called 'My Department.' What I want is to be able to click the button, and SharePoint to grab the logged in user, see what sharepoint group they are a part of, and then look at a list (which has the group associated with a subsite URL) and redirect that user to the URL.
I would rather have the option to place a script in the master page, and then maybe an OnClick event in the HTML, instead of going to one page to redirect (by webpart) to another page.
I have been looking and search for a solution like this, but have been unable to find any. Any help would be appreciated. We are using SharePoint Online with a published site.
Thanks,
Jason Hopp
1 Reply
- Assuming you are talking about SPO, first think you have to learn is that master pages should not be edited in SPO what does not means you can inject JS to then,,,you can indeed do it. In regards of your requirement, you could just simply create a SPFx WebPart or some JS code that just makes what you need