Posts

Create Metadata terms structure with CSV using Powershell

Tagging content is very important feature in SharePoint. This post will help you if you are planing to use tags and for initial configuration you don't want your client to manually create the 1000 of tags with a defined structure. So first thing needed to built this is well defined structure of the terms in Excel file. So that you can easily create CSV file from Excel. While creating this excel file make sure that all the terms you enter this should comes under ONE TERM SET. For other terms set you will be needing another csv file. You can take help from this sample csv file for creating site structure. Next, is to open the PowerShell and write some code. Below is the code functions used for importing excel file. function ImportTermSet([Microsoft.SharePoint.Taxonomy.TermStore]$store, [string]$groupName, [PSCustomObject]$termSet) { function ImportTerm([Microsoft.SharePoint.Taxonomy.Group]$group, [Microsoft.SharePoint.Taxonomy.TermSet]$set, [Microsoft.SharePoint.Taxonomy.Term]$paren...

Get Comment Count in SharePoint

Hi Guys, In this blog I will explain how we can get the number of comments on any page/article. Prerequisites for this blog are: a list with rating enabled, an article/page/splistItem already have got comments from users and a tool like VS to code ;) According to requirement it may be the case that one need to get item comment count using java script or c#. I will explain both way to get the comment count: Using Javascript: This may be the case when one want to use the content search webpart or CQWP to display comment count. Followng code can be use to get the comment Count: var linkURL = $getItemValue(ctx, "Link URL"); linkURL.overrideValueRenderer($urlHtmlEncode); // Get the Comments count var soapEnv = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> \ <soap:Body>    \ <CountCommentsOnUrl xmlns='http://mi...

Schedule daily SQL Database Backup

Hi guys, In practical cases we require backup and restore facility to our database which provides an essential safeguard for protecting critical data stored in SQL Server databases. To minimize the risk of catastrophic data loss, you need to back up your databases to preserve modifications to your data on a regular basis. Backup and restore strategy always protects databases against data loss caused by a variety of failures. Purpose and Scope: In this blog, I am going through step by step that will allow Users to schedule the backup to be taken on a particular interval Delete the backup copies after a certain period of time Prerequisites: SQL server 2000/2003/2008/2012 SQL server Agent (Up and running state) Steps:  Schedule the database backup Steps: Make sure that SQL agent is in running state: Go To SQL Server Configuration Manager > SQL Server Services > Run SQL Server Agent (Set it to Run Automatically) If you are using new versions of SQL server then, Go To SQL ...

Resolution of- The SPListItem being updated was not retrieved with all taxonomy fields.

Image
Hi guys, Let me first explain how I got this issue. While working on some client requirement, I was creating content type and page layout using visual studio. One metadata field has been created as a "site column" using element.xml file. To know, how to create custom metadata field, Please refer my previous blog . All was working perfect, which means I was able to map the custom metadata field with Metadata tag. But when I created a list using visual studio 2013/2012 designer to add field to list. It was giving this error after provisioning the list successfully. Transport Strange error, I was expecting Visual studio more intelligent then earlier. But i felt never trust any tool with your eyes closed ;). Root Cause: Let me explain what was happened. Newly created metadata column "Country" was refereed properly but associated note field was not added to list. Because of which it never work. Resolution: To fix this double click on the list on visual studio. List desig...

Search Service Application stuck on Starting

Image
Hi Guys, I was facing a very strange issue since two three days. I just wasted lot of my time while solving it. After experiencing SharePoint 2013 service architecture, I was under the impression that MS have modified SharePoint this time that one will never face any issue while configuring the service applications. But I was wrong, I am talking about the Search service application here. If you are lucky then it may be the case that you will not see this issue but I wasn't actually explored the reason behind the issue. Issue Description: “Unable to retrieve topology component health states. This may be because the admin component is not up and running.” The default content source “Local SharePoint Sites” is inconsistent. It doesn’t always appear after creation of Search, sometimes with start addresses of existing web apps listed already, other times not. Starting a full crawl results in stuck in ‘starting’.                        Tried Solutions:  Installed all hotfixes by ...

SharePoint on Cloud(Online with Office 365)

Image
Hi Guys, Before starting let me clear that, when part or all of your data center exists physically on your campus(es), then you have an on-premises (not “on premise”) solution. Maintaining a SharePoint farm on-premises is startlingly complex and expensive. SharePoint is a Windows Server-based, multi-tier ASP.NET Web application that uses SQL Server for its data tier and relies heavily upon Web standards and the .NET Framework. When you add in other, related Microsoft servers such as Exchange and Lync, then between physical hardware, electricity, licensing, and support costs, you are facing a huge investment of time, money, and effort. Microsoft gives us SharePoint Online and Office 365 as a cloud-based alternative to deploying and maintaining an on-premises farm. Specifically, the Office 365 product is a particular type of cloud computing known as software as a service, or SaaS. SharePoint online is one of product included in MS online service solutions and is part of Office 365. Micro...

Managed Metadata Fields in Office 365/SP Online Sandbox Solution

Hi, Developing Metadata fields is always a complicated case of the developers. My previous posts( Add Metadata Taxonomy Custom Field using Visual Studio ) I explained how we can create metadata site columns. In this  post, I will target Office 365/SP online users who can only use sandbox solutions to update/create metadata fields. Reason why treditional solutions does not with Office 365 In practical scenario, Metadata service details like SSPID, Default term store etc keep on changing. I notice that the name of Metadata service of SharePoint Online keeps on updating after some updates. We all know that code  in sandboxed solutions is being deprecated by Microsoft. But even if we were happy to use sandboxed code - in Office 365/SharePoint Online, we cannot use the  Microsoft.SharePoint.Taxonomy  namespace in server-side code anyway – the net result is that we are unable to “finish the job” in this way to ensure the field is correctly bound to the Term Store. This is a problem! Even wor...