Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to set a list alert for current (logged in) user using javascript.

    var currentcontext = new SP.ClientContext.get_current();
    var currentweb = currentcontext.get_web();
    currentcontext.load(currentweb);
    var currentuser = currentweb.get_currentUser();
    var list = currentweb.get_lists().getByTitle("List Name");

I am getting the current user and list using this code, but I do not know how to set alert for this user on this list

see below snapshot

enter image description here

i want to set alert same like which mention in snapshot using javascript.

Thanks.

share|improve this question
    
which kinds of alert you want to set? alert user when item changed? –  Raymond Apr 25 '13 at 10:08
    
i modified my question. –  Hitesh Chandegara Apr 25 '13 at 10:27

2 Answers 2

I did something like this for a client. My solution was made a web service. By this web service I was able to make an AJAX call and create an Alert code behind.

share|improve this answer

There is no built in way via the SharePoint JavaScript Object Model according to my research.

Likely you will have to build your JavaScript to work with the SharePoint 2010 Alerts Web Service: http://msdn.microsoft.com/en-us/library/websvcalerts(v=office.14).aspx using JQuery or whatever framework calls from JavaScript on your page.

share|improve this answer
1  
The SharePoint client side APIs do not support a Create or AddEvent operation, so this is a no go. –  Paul T. May 11 at 14:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.