Automatic Alert Subscription for specific items in a list

We currently have a SharePoint foundation 2010 calendar that allows creation of entries via a custom form. That form allows users to create an event specific to our business, including setting a sales person for the event, a technician to do the work, etc. We currently have a list of salespeople and technicians manually coded into the form. We are looking to get the following behavior for this form:

If someone creates a new event and designates a salesperson or a technician, we would like that salesperson (or technician) to be subscribed to alerts for that event automatically.  Just by having the salesperson (or technician) designated on an event which has been saved we want that to create the subscription without any additional steps by the user entering the event, or by the salesperson or technician. We don't want that salesperson or technician to get alerts for other events associated with other sales people or technicians, just their own (so they should not be getting alerts for every item in the calendar associated with another technician or salesperson).

What's the best way to do this?

Thanks!
LVL 12
Julian123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jamie McAllister MVPSharePoint ConsultantCommented:
There's no really nice answer for this. It is possible to add some script to your form, and that script can subscribe a named user to alerts. However, the javascript has to call the SharePoint web services responsible. It's not really straightforward;

http://sharepoint.stackexchange.com/questions/66773/how-to-set-list-alert-using-javascript-in-sharepoint-2010

However Marc Anderson put together a script library called SPServices to make it easier to call such SharePoint web services from code.

Adding the services;

http://sympmarc.com/2011/07/08/adding-jqueryspservices-to-a-sharepoint-page-step-one-always/

Adding an Alert with SPServices;

http://www.itidea.nl/index.php/simple-alert-me-option-on-a-sharepoint-page-with-spservices/


A little more work will be needed to plumb the bits together for your specific requirements, but I'd say this is a good start.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rainer JeschorCommented:
Hi,
there is no "direct" possibility to use Javascript/Client Object Model or built-in web services.

So either you use the method mentioned by JamieMcAllister or
- create your own web service which provides an interface to create the alert server side
- create an event receiver

Both have their pros and cons but I would suggest to use the custom web service approach - just due to re-usability and control.

HTH
Rainer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.