sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SharePoint alert me fuctionality in SPFx

Open rsreeraj opened this issue 5 years ago • 5 comments

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [ ] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc React

Issue description

I am trying to create List alert using react in SPO SPFx solution. Basically I need to create a webpart with button control. When user click on the button user alert needs to be created for the list.

Could you please help to build it.

rsreeraj avatar May 03 '21 08:05 rsreeraj

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar May 03 '21 08:05 ghost

You could use SharePoint rest api to create the alert: _api/web/Alerts/Add(...)/. Refer to: https://s-kainet.github.io/sp-rest-explorer/#/_api/web/Alerts/Add

Here is a similar question: https://sharepoint.stackexchange.com/questions/262556/create-list-alert-using-rest

Michael Han Microsoft SharePoint Community Support

michaelhan-1 avatar May 04 '21 04:05 michaelhan-1

I gone through the article https://sharepoint.stackexchange.com/questions/262556/create-list-alert-using-rest,. still Iam not getting it worked. Could you please advice.

Sreeraj R

rsreeraj avatar May 04 '21 05:05 rsreeraj

You could try this jsom code to add the alert: https://gist.github.com/beckettkev/6f3389963294aa1b566a59fde48dc245

This has been solved here: https://github.com/SharePoint/sp-dev-docs/issues/4883

michaelhan-1 avatar May 04 '21 06:05 michaelhan-1

Thank you for your submission. As explained in our wiki (Issue List: What doesn't belong in the issue list), this issue list is for SharePoint developer/development issues. All capability question/discussion questions, or topics related to SharePoint administration & end-user topics should be reported through the support user interface available in the tenant admin settings. You can also have a discussion and ask questions at the SharePoint TechCommunity forum. You can learn more about this in our wiki: type:invalid-not-dev-issue

ghost avatar May 04 '21 14:05 ghost