wiliammbr's blog

Some thoughts on SharePoint and other random stuff

Month: January 2017

Troubleshooting errors in SharePoint using Powershell and Get-SPLogEvent

Today I would like to share with you an useful way to troubleshoot errors in your SharePoint site when some unexpected error occurs.
You will need two things: the Correlation Id and access to Powershell or SharePoint Management Shell on the server. Once you got these two things, just paste the code below replacing the CorrelationId parameter with your Id.

This example is extremely simple, but saved my life a thousand times. The Get-SPLogEvent accepts other parameters too like Start and End Time too, that will help you on filtering better. Here is how the Log will be formatted in the text file.

References:
Zimmergren
Technet

Hiding Empty Content Query Web Part

For those who want to hide their Content Query Web Parts if they don’t return any data and at the same, who don’t wanna dive into the XSL world, you can just add this code snippet to your pages and VOILÀ.

It’s up to you if you want to set this behavior to every page in your Web Site putting the code in a global JS file, or just for an specific one using a Script Editor Web Part to do the trick.

 

Kickoff

Two years ago I abandoned my old Blogspot site where I used to talk about SharePoint, in Portuguese. I had to leave it behind due my opportunity to study abroad in Japan for one year, by a government program called Science without Borders that was letting Brazilian students to study in a country of their choice.

BUT NOW I’m back to Brazil and already settled into this wonderful culture, so I’ve decided to restart my old project and to try again building this website and publishing information that I find useful. Actually it won’t be just a common blog, because I’m also going to try some fancy stuff working on a personal website which I have more tools to invent and publish new content about not just SharePoint, but other topics. Well, I must admit that the main focus will be SharePoint and Office 365.

SharePoint    Office 365

You can see below my objectives:

  • Share some experiences that I will have working with SharePoint and .NET;
  • Discuss ideas about best practices for coding, performance and information architecture;
  • Promote some nice content from other bloggers or websites that usually help me in my daily tasks.

Well, I hope I can help you someday and that we can find ways to solve problems together too!

Here we go!

© 2017 wiliammbr's blog

Theme by Anders NorenUp ↑