SharePoint SOM or CSOM?

1.5k views Asked by At

I need to do the following in our existing SharePoint 2013 server:

"Create a timed job that reviews rows in a list

  • Send an email notification to a user based on logic
  • Update the list
  • Add/remove the users to an AD group "

As per this article it looks like "Server object model" is the way to go for this: https://msdn.microsoft.com/EN-US/library/office/jj164060.aspx#ServerOM

However currently I do not have a SharePoint installation on my development machine (Windows 7 Professional, 32 bit, 4 GB RAM).

I think it is possible to use SharePoint Client object model to achieve what is needed.

Anything I need to look out for here?

2

There are 2 answers

0
Marcus Kaseder On BEST ANSWER

You can still do "timer jobs" with client API.

You can't use SharePoint timer jobs anymore, so you have to run your "timer jobs" on your own as Windows Sheduled Task (OnPrem) or Windows Azure Web Job (SPOnline).

See https://github.com/OfficeDev/PnP/tree/master/Samples/Core.SimpleTimerJob for a "remote timer job" example and video.

HINT: It's not necessary to create a SharePoint Provider Hosted App. You can connect to SharePoint with ClientContext and URL parameter. In this case, you have to make sure that the executing user has permissions to given SharePoint site.

0
Max On

At this MSDN link you can see the capabilities of the API for Sharepoint 2013.

Below the image of the page you can read:

If you want to do this ...                ... use these APIs

Create a timer job                            Server object model


I think you must install Sharepoint on your develop machine.