Disabling SharePoint 2010/2013 Mobile View using SPWebConfigModification

SharePoint 2010/2013 Mobile view is quite useless. Disabling it with Web Application feature (don’t forget to set ActivateByDefault=”FALSE”). Adding tag into web.config using SPWebConfigModification class in the feature event receiver. Code below:

Continue reading


SharePoint 2013 Fixes for IE11 Incompatibility Issues

IE11 has incompatibility issues with SharePoint 2013, mostly due to the fact that IE specific SharePoint OOTB scripts use JavaScript methods and properties that have been deprecated in IE11.

Some common ones include:

  • Using .attachEvent() methods instead of .addEventListener()
  • Using document.body.all property instead of document.getElementById()

This can be resolved by forcing IE10 compatibility mode using <meta http-equiv=”X-UA-Compatible” content=”IE=10″ />. However, if you wanted to utilize IE-edge, we can fix the errors using the JavaScript below.

Continue reading

Microsoft Flow Approval with Delegation

Microsoft Flow has Approval actions, which allows you to send an approval email to 1 or more approvers to get their feedback, and pauses the flow while it waits for it.

However, there is no built-in delegation, so in cases where an approval is pending, and the approver(s) are not available, it stays stuck indefinitely waiting until the set approver(s) action it.

We can build a simple delegation mechanism into our Flow to try to alleviate this issue, where after a 1 week period, the approval gets “delegated” to someone else to action.

MS Flow Approval Delegation - Overview.png

Continue reading

Updating SharePoint Online Document Set in Microsoft Flow (including Taxonomy Field)

This is a follow up from my previous post onĀ Creating SharePoint Online Document Set in Microsoft Flow.

We’ve created the document set, and now we want to update some of the properties for the document set, one of which is a single value taxonomy field.

Assuming add-in only authentication has been set up and the access token has been obtained with a HTTP action and parsed into JSON, as per the previous blog post.

We now have actions after creating our document set to update the document set.

MS Flow Update Doc Set - Overview.png

Continue reading

Creating SharePoint Online Document Set in Microsoft Flow

As of the time of writing this, Microsoft Flow does not include any SharePoint connector actions to create a document set in a document library, which is quite inconvenient.

Instead, we are left to deal with this using SharePoint’s REST API, which is not straightforward and proves to have a few gotchas to watch out for.

This is the overview of a Flow that will create a new document set in the Documents library, on trigger from a list item, just for the sake of a demo.

MS Flow Create Doc Set - Overview.png

We will go through each action step by step below.

Continue reading

Getting Document URL using JSOM

To get the URL of current list item / document using JSOM, when in the EditForm.aspx page:

var context = SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getById(_spPageContextInfo.pageListId);
var listItem = list.getItemById(parseInt(GetUrlKeyValue('ID')));


    function () {
        $fileRef = listItem.get_item("FileRef");