Sunday, August 19, 2018

SharePoint document metadata not updating

I faced a weired issue today, Metadata for document which is lookup column was not updating even after saving the item.

There was no error in browser and only modified timestamp was getting updated, Not sure about why this happens but I found the solution. I got the exact error after editing document properties using word.

So the issue I was facing was :


  • Document metadata was not updating OR
  • Lookup column was not saving value OR
  • Lookup column was updating as empty OR
  • In Word I was getting : Document Information Panel: Value’ is in nil content

 I guess this happens only  in document library.

Solution for fixing this issue is as follow:


  1. Open word document and click on Home/File button in Top Left window
  2. Click on Info in right navigation
  3. Click on Check for Issues 
  4. Click on Inspect document 
  5. Select Document Properties and Personal Information, Click Inspect Button.
  6. After that click on remove all
  7. Save & Close document 
  8. Edit properties should work now

Sunday, April 16, 2017

Seven steps to build and deploy SPFX web part to SharePoint

  1. Install Node.JS
    Use this link to install Node.JS https://nodejs.org/en/

    2.       Install yeomen and gulp
    CMD>npm install –g yo gulp

    3.       Install SPFX generators
    CMD>npm install –g @microsoft/generator-sharepoint

    4.       Create First Web part
    CMD>yo @microsoft/sharepoint

    5.       Run and Test Project
    CMD>gulp trust-dev-cert
          CMD>gulp serve

    6.       Package and Deploy
           CMD>gulp package-solution

    7.       Install and Add on Page
    A.      Upload the *.sppkg file in app catalog
    B.       Add new App from site contents page
    C.      Keep app running in local
    D.      Create new page and Add App

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

SharePoint document metadata not updating

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