Sunday, November 29, 2015

Bundling and Minification - SharePoint best practice

Found this really helpful article about bundling and minification using visual studio extension:


https://msdn.microsoft.com/en-in/library/dn850363.aspx

SharePoint script on demand

This is very old now and exists in market from long time for SharePoint, So thought of summarizing it once.

1.     Create file with name ShareTechPoint.js and below content

function sayHello() {
  alert("Hello");
}
//Notify SharePoint that the custom file has loaded.
SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("ShareTechPoint.js ");


2.     Now write the below code in another  HTML/ascx/aspx file

<script type="text/ecmascript">
 
    function runCode() {
        SP.SOD.RegisterSod(‘ShareTechPoint.js ', 
                            '/StyleLibrary/ShareTechPoint.js');
        var x = ExecuteOrDelayUntilScriptLoaded(sayHello, 
                              "ShareTechPoint.js ");
    }
 
</script>
 
<input id="Button1" type="button" value="Run Code" 
onclick="runCode()" />


 


This is how you can implement Script on demand for SharePoint.

References
  • http://www.ilovesharepoint.com/2010/08/sharepoint-scripts-on-demand-spsod.html
  • http://www.kalmstrom.com/Tips/SPDevDynamicLoading.html

Client web part / App Part showing the blank iframe on page

Hello all - While creating first hello client web part many times people face this issue that there cleint web part show blank window after adding on page.

For showing content on page need to allow framing on page as client web parts loan in iFrame.


<WebPartPages:AllowFraming runat="server" />


Check for above line of code on client web part file. If not preset add it there.

Wednesday, November 18, 2015

Download all Site collection documents / Files using Powershell in specific folder

I updated the script written by "Nico Martens" in below blog post

http://sharepointrelated.com/2014/11/11/download-all-content-in-a-site-collection/

Below script will download all your documents in specific folder of Site and List

Sunday, September 6, 2015

Tuesday, August 25, 2015

List of feature improvement in SharePoint 2016



Find below list which is full of awesomeness about SharePoint 2016 improvements:


1. Lists in SharePoint 2016 are Optimized(5000 list item threshold),  SP2016 auto manages the index to optimize large lists.

2. Stsadm is deprecated but it will still work and can be used for running commands that are not available through PowerShell yet.

3. SPFX is will be available for SharePoint 2018 on prem feature pack 2 onwards


Will Update more in some time



SharePoint 2016 installation step-by-step

Today Microsoft launched preview beta version of SharePoint 2016. 

Download link : http://www.microsoft.com/en-us/download/details.aspx?id=48712

New features added in SharePoint 2016  : https://technet.microsoft.com/en-us/library/mt346121(v=office.16).aspx



Lets get hands on installation and user experience using below step by step installation screens of SharePoint 2016 

1. Installing Pre-requisite




2. Splash Screen



3. Installation started for SharePoint 2016


Product key for 180 Days trial "NQTMW-K63MQ-39G6H-B2CH9-FRDWJ"



4. Installation done Run Config wizard 



 As you know we dont have standalone concept in SharePoint 2016. So need to configure single server FARM and install DB first. Database Installation in progress for further processing.













SharePoint document metadata not updating

I faced a weird issue today, Metadata for document which has lookup column was not updating even after saving the item. There was no erro...