How to add a new item to a SharePoint list using Javascript and the Lists.asmx web service

I had an idea at the beginning of the year. I am the Site Collection Administrator and am only responsible for administering and developing solutions for my SharePoint site collection in my office (about 2000 employees). I do not have access to the SharePoint servers to install WSP’s, use STSADM, or even PowerShell.

I am in charge of all development for my Site Collection but getting a custom SharePoint web part or WSP solution into production takes weeks….and sometimes months. So, i began working with the Content Editor Web Parts (CEWP’s) to see if I can use the SharePoint Web Services and Javascript as a “Poor man’s” web part. My “Poor man’s” web parts are only CEWP’s which don’t have to go thru a special code review and approval process before being moved into the production SharePoint farm.

If you are under these same kind of restrictions, maybe you’d like to consider this approach as well. However, this isn’t the best approach in that things can ‘break’ easily if someone modifies your code in the CEWP’s.
 
(more…)

Using an XML “settings” file to store values for your SharePoint projects

I recently created a SharePoint timer job solution that relied on the data in a list as to what the function of the job was to do. The solution requirement was to have a timer job set to run at 8:00am every Thursday that would read SharePoint list data and create a customized email of that data for the week.

Since I work in an environment with multiple SharePoint farms, I had to rely on a ‘settings’ file that I could easily change without having to recompile and redeploy my WSP solutions. I will show you how to read the nodes and values of an XML file located in a SharePoint list that your SharePoint solutions can reference, thus eliminating the need to recompile your code for each SharePoint farm. Let’s get started…
(more…)

Recovering from a deleted site collection

Mauro Cardarelli wrote a nice “to the point” article on how to recover a site collection from the SQL database backups. You can find his article here: http://blogs.officezealot.com/mauro/archive/2007/12/12/20674.aspx

You go to your portal this morning and instead of seeing the home page you are greeted with a ’404′ error page. Something is wrong! You look in Central Administration and you notice that your Web Application is there but the site collection is gone. Ouch! Time to recover…

In this scenario, let’s assume that you have NOT been doing site collection backups but you do have SQL backups. You notice that last night’s content database backup is considerably smaller than the night before (yes, you have been saving multiple days of backups). Phew! Your data is all there; we just need to reconnect it. Here’s how:
(more…)