Posts

Showing posts from May, 2017

Sort Custom Site Templates Alphabetically in SharePoint 2013

Image
Custom Site Templates are really useful in SharePoint when you have to create sites using same settings, objects, content and look & feel. However there are couple of functionalities that should be already implemented in SharePoint but somehow they are not. We have to code for them mostly. We generally create custom site templates in SharePoint and they show up in the Custom tab. However, working on a recent project we got a request from customer that the custom site templates are not in sort order in SharePoint 2013 which gives an ugly looks to end users for creating sites. There is no Out Of the Box solution provided by Microsoft for this so we had to write some custom code. We have created a custom Site Collection level feature which just sort the custom site templates in SharePoint 2013 create new web page. Here is how it looked Before and After the feature implementation. Before: After: Unfortunately i can't share the complete code of th

DateTime Picker not working with site names which contains apostrophe ' in SharePoint 2013

Image
I have noticed that some of the sites in my SharePoint 2013 farm which contains an Apostrophe ( ' ) in their name works fine except their DateTime Picker for any of the custom list. (The OOTB Calendar type list just works fine.) If you create a custom list and add a DateTime type column in that list, in the NewForm.aspx the DateTime picker won't dropdown to select dates if the site has an Apostrophe ( ' ) in its name. I have a site below in SharePoint 2013 (i have a little branding so don't get confused) where i created a simple custom list. I clicked the Calendar icon but no dropdown appeared. Change the name of the site from Site Settings and removed the Apostrophe ' character. Before After Tried to browse the site again and the clicked on Calendar icon again in the same form. It worked... :) Its Microsoft kind'a thing and till now i haven't heard that Microsoft noticed this issue and released any patch.

PowerShell Script : Mount Multiple Content Databases at once with SharePoint

Image
Below is the code that you can use to mount multiple content databases with SharePoint (2010 or 2013 or 2016). Put all of the content databases names in DB.txt file and run the script. 1. Create text file with name “DB.txt” in the same directory where script file is present. Write database names in “DB” file.  Make it sure each name should be in new line and write End Point at the end as shown below. 2. Open SharePoint 2013 Management Shell 3. Change directory path to path where script file is saved. Then type ./MountSPContentDB.ps1 and press enter key. (Copy the script in a file and name it MountSPContentDB.ps1)  Provide web application url and press enter key. Provide SqlServer name and instance.  4. Result  You can track the complete log file (named MountSPContentDB -current date and time) which you can find in the same directory where your script file is located.  Script: $currentTime = Get-Date -Format o | for

Components that could break after SharePoint upgrade

Although you can predict most of the stuff that could go wrong after a SharePoint upgrade or migration but still there are chances that you miss something. I have compiled a list of components that could break or stop working after you move to new SharePoint environment. I'll be updating this post whenever i found anything else breaking after SharePoint upgrade. I apologize for my rough formatting. :) InfoPath: Connections with external services and libraries. Connection with User Profile Service Application. When upgrading to 2013 from 2010, you need to update where fetching User Information like User Name User Friendly Name. SharePoint 2013 works on Claims Based Authentication so InfoPath 2010 Form Views may crash if you are showing view on user based. OneNote: OneNote Sync URL change OneNote not syncing Static URLs: Static URL's used in Web Pages, Always use relative URLS Connected Excel Files: Data exported in Excel files could break if URL change after mig