Tuesday, July 21, 2015

Updating the view to have ID field as bold using Link to JS file

(function () {
var overrideCtx = {};
overrideCtx.Templates = {};
overrideCtx.Templates.Fields = {
'ID': { 'View' : EditorField}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();

function EditorField(ctx) {
var retVal='';
retVal="<b>" + ctx.CurrentItem.ID + "</b>";
return retVal;
}

How to launch a document by clicking a link to the file?

Word: <a href='ms-word:ofe|u|path/to/web/word/document.docx'>Link to document</a> Excel: <a href='ms-excel:o...