Skip to main content

Posts

Creating New List Form in Discussion List? Be aware of limitations!

If you add a New Form to the Discussion List and set it as default, you would expect all Discussion List web parts to point to the new form. Unfortunately, it does not! To explain this behavior, let me start with a custom List. Let us take any custom List. By default, it has 3 forms (New, Edit, and Display). Open SharePoint Designer, navigate to this List and add a new "New Form" (call it NewForm2.aspx) and make it as default. Now wherever you have added the above custom List as a web part (List View Web Part), when you click on "new item", it opens up the newly created NewForm2.aspx. This is what we would also expect since we have made it as default New Form. If you closely observe the hyperlink of "new item" in a List View Web Part, it looks as below: http://[domain]/sites/[SiteCollection]/_layouts/15/listform.aspx?PageType=[PageTypeID]&ListId=[ListGUID]&RootFolder= Basically when we click on "new item" link, it takes us to a l...

How to resolve "400 bad request" error in getFolderByServerRelativeUrl REST call

I was working on SharePoint 2013 REST API to fetch the list of folders from a document library specifically a discussion List. The usual lists/getByTitle endpoint gets the list of folders but without the URL of the folder. When I checked the REST API examples at MSDN , one thing which caught my attention was getFolderByServerRelativeUrl endpoint. Unfortunately the examples provided in the MSDN is not correct. As per the MSDN, we need to pass the document library name as a parameter. executor.executeAsync({   url: " /_api/SP.AppContextSite(@target)/web     /getfolderbyserverrelativeurl( '/Shared Documents' )     ?@target= ' ' ",   method: "GET" ,   headers: { "accept" : "application/json; odata=verbose" },   success: successHandler,   error: errorHandler }); When we try this, we get 400 error (Bad request). So what is the correct way of making it work? You need to pass the relative URL of the document library not just ...

How to get item ID in Calculated column using Document ID

In my previous post, I explained about a new feature " Document ID Service ". Using this feature, we can resolve one of the basic problems we had for long in SharePoint history. And that is the title of this post! There is no way you could get the item ID in a calculated column using ID field. When you try to create a calculated column, it is very evident that ID column is not listed under fields. However, if you go ahead and use ID column, it will not prompt any error. For example, I have created a calculated column and it's formula is =[ID] . When I add a new item, this column returns 0 as shown below. Calculated Column using ID field However, if you edit an item, the calculated column shows the correct value. This has been the problem since MOSS 2007 version (I started my SharePoint journey with 2007 version, so I don't know about prior versions). One workaround was to create SharePoint Designer to do this calculation and set the value. Now with Documen...

Document ID Service - New Feature in SharePoint

When I explored this new feature of SharePoint in Online (this feature is available in SharePoint 2013 also), I found it interesting because it solved one of the common problems people faced in SharePoint. I will first explain about this feature and I'll cover the problem and the solution in another post. This feature allows Site Collection Admin assign a unique ID to every document in the site collection out of the box. If you recall, there was no out of the box way to assign a unique number to the documents across libraries in a site collection. Yes ID column is unique but only within a library. Document ID column contains a number which is unique across libraries. To start with, let's have a look at a typical document library. This is a familiar view for SP guys. By default, you don't get Document ID column in a library. All Items View To get Document ID column, you need to activate a site collection feature "Document ID Service" as shown below. S...

SharePoint Server 2016 Update

Yesterday Microsoft announced that SharePoint Server 2016 will be available by Q2 2016. A few things which caught my attention are People-centric collaboration - Not sure what does it mean but is it something like Delve? On-premises can use the power of Delve and Office Graph. Data Loss Prevention (DLP) feature brought to the SharePoint. It looks quite exciting! Hope there will be a major change from user experience perspective. This alone can boost the SharePoint adoption in the Organization.

Server Name Mappings in SharePoint Search

I had one interesting learning, so thought of sharing this information here. Suppose you need to crawl certain files which are stored in a file system. These files are accessible over http URL through a non-SharePoint application. We had challenges in crawling through URL. The option we looked at was to crawl the file system. These files were shared and SharePoint search was configured to crawl this location. When we search for a document, it successfully displayed the result as shown below. Search Result If you notice, the location is shown as "file" path. The ideal scenario is to replace this path with the URL path which users have access to. This is where Server Name Mapping helped. Navigate to Central Admin -> Manage Service Applications -> Search Application -> Server Name Mappings. As shown below, set the corresponding URL for file path. Add Server Name Mapping After you set this, perform a crawl and search for the document. In the search resul...

There is no exclusive SharePoint Online Administrator role!

SharePoint Online is part of O365 tenancy. O365 Global administrators are something like farm administrators in our On-Premise SharePoint deployment. However, global administrators will have complete control over O365 tenancy components such as SPO, Exchange Online, Lync etc. In a typical large enterprise, you would expect SharePoint Administrators who are currently managing on-prem farm to manage SPO as well. With this in mind, I started Googling and I was taken to this specific article which talks about something called SPO Admin. However, when I looked at such a role in O365 Admin console, I could not find any such group. After digging more into this, I got hold of a few articles where authors have clearly mentioned that Global Administrator is SPO Administrator. These two are not segregated. I really wonder what could be the thought process behind this design from MS. A separate role could have resulted in delegating SP specific administration activities to SP team. Hope MS w...