Getting innerText to work in Firefox and return/set only first node of jQuery.text()

21 September, 2015

Firefox uses the W3C-compliant textContent property instead of innerText. Most other browsers, such as Chrome and IE, use innerText and, to make things worse, IE does not support innerText. Also, when using jQuery.text(), all text inside the node plus its child nodes are returned, which is not the same as innerText or textContent. To get around this, I wrote a small jQuery plug-in. The code (function( $ ) { $.fn.innerText = function(text) { var ff = (typeof this[0].


Development environment for low-trust apps: Configuring and using SSL

09 September, 2015

SSL/HTTPS is a required step for most SharePoint installations and deployments. The entire web community is moving towards secure communications. However, I still see most development environments set up using HTTP only and I still see many issues when moving to test and production environments, such as mixed content blocking. In this case, the browser will not load resources such as data sources, scripts, CSS files and images as they are in HTTP while the main page is in HTTPS.


Script to import, export and compare crawled and managed properties between SharePoint farms

04 August, 2015

I got really excited when using the export-import-mp.ps1 script by Riccardo Celesti that can export and import managed properties between search service applications in SharePoint. However, I would like to compare all exported properties of one environment to a fresh “vanilla” installation so that a documentation can be created. Export the modified managed properties The export-import-mp script is just great, it will export and import managed properties to and from a CSV file.


Filtering CAML queries by time values

03 August, 2015

When querying a SharePoint list, or creating a view, you can filter using the built-in keyword Today. However, the Today keyword will not return the time, only the date when using a CAML query. First of all, you need to mark the query filter value with IncludeTimeValue as: <Value IncludeTimeValue='TRUE' Type='DateTime'><Today /></Value>However, as the Today field has no time information, this will fail. Instead, create a local variable string today = DateTime.Now.


Automatically moving SharePoint site collections to separate databases

05 June, 2015

I had a requirement to move site collections into separate databases after a large migration. For this to work, I have one content database that is created as default with maximum number of sites set to 5000. My script will then create new databases with a site limit of 1 and move the site collections to that database.