1

I want to create a link /button on my SharePoint home page which effectively subscribe current user to an Alert that I have set on a particular list/library.

I want to achieve it using JS/Jquery.

The alerts notifies subscribed user of any change in the list.

  • Will this list always be the same so that you only want to have the default "Alert Me" function of your list at a page as a special button? – moe Oct 4 '16 at 7:33
  • @Moe.I have set an Alert on a list using "Alert Me" function. When a new item is added it sends an email notification to me. So when other users are visiting the site I want a button which subscribes to this particular alert . So when they hit subscribe button they should also get the same email notifications that I am getting . – Ahmed Oct 4 '16 at 8:40
  • Just something about the background - what you are looking for is a custom button on a page which sets alert to a specific list. The alerts in SharePoint are per user, so you are not attempting to "subscribe for the same alert", but instead to "subscribe for a new alert". About how to implement this custom button is something I don't have for you to suggest right now. – moe Oct 4 '16 at 8:44
  • Okay. So what you mean is that User A has to set his own new alert on the particular list in order to receive the email notifications rather subscribing to User B's alert on the same list? Aint there any work around? – Ahmed Oct 4 '16 at 8:55
  • Yes, that's how it goes. I'll continue in the form of answer as there actually might be a simple solution for this one. – moe Oct 4 '16 at 8:57
2

As mentioned in the comments, the alerts in SharePoint are per user, so you are not attempting to "subscribe for the same alert", but instead to "subscribe for a new alert".

If you want to create a custom button the users can click to subscribe for specific list, create your HTML button with a link to the following URL:

https://sharepointsite/_layouts/15/SubNew.aspx?List=%ID%7D&Source=%2F_layouts%2F15%2FMySubs%2Easpx

In this URL the ID is the ID of your list. You can rather easily get this URL by accessing to https://sharepointsite/_layouts/15/SubChoos.aspx, selecting the wanted list and clicking Next. The URL on the following page is what you are looking for. Note that if your list is on a subsite, you should adjust the URLs to include the path to the subsite.

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.