Form Validation and Custom Save Functionality in the Standard SharePoint List Form

Mike BerrymanI have a client that needs to log any interactions with their customers in SharePoint.  This client is proficient enough with SharePoint that they feel perfectly comfortable modifying lists in order to add or remove fields to accommodate their needs without having to go through us.  They are regularly adding new fields to this log list in order to capture some new piece of relevant information that it was decided they needed.  This is important background because when they approached me to create a way for them to generate multiple log entries from one “New Item” SharePoint List Form, I knew I couldn’t just create a custom “New Item” form to accomplish this or they would lose the ability to add new fields without having to either modify this custom “New Item” form, or involve us to make those modifications.

So I had to come up with a solution that would retain the standard “New Item” form (so any fields added/removed from the list would be reflected in the form) but would allow for the user to create an entry in their logs for every customer selected in the form.

Continue reading “Form Validation and Custom Save Functionality in the Standard SharePoint List Form”

Managing Content for Similar SharePoint Sites

Mike BerrymanI have a client that has over 50 subsites of the root site in a SharePoint site collection that are all pretty much the same.  There’s a site for each county in the client’s state, each one with web parts to show some data from the root site that’s relevant to that specific county (contacts’ information, documents, that kind of thing).  Whenever they wanted to make a change to, say, the contacts web part for these county site, they had to modify over fifty copies of the same web part.  Tedious to say the least.  After a few rounds of making these kind of repetitious modifications it was decided that I would need to come up with a solution to make managing this stuff much easier.

So I did.

Continue reading “Managing Content for Similar SharePoint Sites”

Inject Scripts in SharePoint with JavaScript

Mike BerrymanDon’t worry, it’s the good kind of Script Injection!

I was recently working in a SharePoint environment where I wanted to have some JavaScript libraries (like jQuery and moment.js) available across the entire site collection.  The most obvious solution would be to add a reference to each library into the master page(s) used across the sites in the site collection but for this situation editing any master page was not an option.  Instead I wanted to use User Custom Actions to do script injection.

Continue reading “Inject Scripts in SharePoint with JavaScript”

SharePoint File Extractor

Mike BerrymanDo not try and find SharePoint files, that’s impossible.  Instead, only try to realize the truth… there are no SharePoint files.

In SharePoint, most (not all) files don’t actually exist in the conventional way.  What I mean by this is that you can’t just browse to a directory and open a SharePoint page in your favorite text editor and make changes.  Instead, most files in SharePoint exist as BLOB data in a SQL database and the only way to actually edit these files is through SharePoint Designer.

So what if you want to have any of these files in source control?  Of course you could use SharePoint Designer to copy/paste the contents of each target file to your file system, but that is extremely cumbersome (you can’t just copy/paste a file itself, you need to actually open it and copy the contents).  As our clients have become more and more proficient with using SharePoint Designer to make their own changes we have had an increasing need to actually get these changes in source control.

Continue reading “SharePoint File Extractor”

SharePoint Document Libraries, Versioning and REST

Mike BerrymanOne of my more recent projects in SharePoint 2013 had the client asking for a pretty basic document management system.  This project was done primarily with Javascript using REST calls to the SharePoint server.  Part of what the users needed to accomplish regarding document management was:

  1. Upload documents from the application
  2. Fill in metadata about the document
  3. Allow for uploading a revised version of a document as a new version of that document

Continue reading “SharePoint Document Libraries, Versioning and REST”

Using a Text Editor With Sharepoint 2013

misc2One thing I found irritating when using SharePoint was the built-in editor.  Other than color coding the code, it didn’t really have any other features. I was working by copy/pasting the file into Atom, and then editing the file, and copy/pasting it back.

Continue reading “Using a Text Editor With Sharepoint 2013”