Get recent changes on SharePoint Taxonomy using JSOM

If you are using the JavaScript Object Model (JSOM) for your SharePoint solution that involves taxonomy, and you need to know if there have been any changes to the taxonomy since a certain date. Then this blog may help you.

The getChanges method

I needed a way to find out if there had been any changes to the taxonomy that could be selected in a managed metadata field, since a certain date. So I’ve searched in the existing documentation and the rest of the internet for clues on how to achieve this.
The best method to match my needs was the “getChanges” method on the TermStore, TermGroup, TermSet objects (SP.Taxonomy namespace).

As the documentation describes that the function expects “changeInformation” as an argument, and will return a SP.Taxonomy.ChangedItemCollection. However, it appears to not be documented how a SP.Taxonomy.ChangeInformation object is created. Since I couldn’t find an existing example online, I thought it would be worth adding an example to the internet with this blog:

Author: Pieter-Bart van Splunter

Leave a Reply

Your email address will not be published. Required fields are marked *