Tuesday, January 6, 2015

Combining 2 SQL queries and getting result set in one

You can aliasing both query and Selecting them in the select query

SELECT x.a, y.b FROM (SELECT * from a) as x, (SELECT * FROM b) as y

Sunday, December 14, 2014

SharePoint 2013 - Change URL of document library

When you create a document library, it ask you the name for the DL. Once you give it, it will create library with same name and URL. You can change the name of the library any time but cannot change the url. Here are the things i followed to create url accroding to my needs:
  1. Just go to a library trough 'Site Content'
  2. When inside the library choose on the ribbon 'Library' tab.
  3. Then select 'Open with Explorer'.That will open your SharePoint's library in Windows Explorer window.
  4. Navigate one folder up and you will see list of your libraries as folders.
  5. Rename required library's folder name as you want the URL to look like.
  6. Close the windows and refresh the browser or go back to home page and browse the library again.
Reference:
http://sharepoint.stackexchange.com/questions/111524/sharepoint-2013-change-url-of-document-library
http://stackoverflow.com/questions/12904944/change-sharepoint-library-url

Wednesday, November 12, 2014

SharePoint 2013 - Check Correlation ID using Management Shell

<GUID> = Correlation ID = 0e90cb9c-1855-80fc-177a-ebaed1a55500

Code:
get-splogevent | ?{$_.Correlation -eq "<GUID>"} | select Area, Category, Level, EventID, Message | Format-List
Example:
get-splogevent | ?{$_.Correlation -eq "0e90cb9c-1855-80fc-177a-ebaed1a55500"} | select Area, Category, Level, EventID, Message | Format-List

Tuesday, November 11, 2014

Minimal Download Strategy in SharePoint 2013 ( _layouts/15/start.aspx issue)

_layouts/15/start.aspx is part of the Minimal Download Strategy in SharePoint 2013 which helps in improving the performance of page rendering. If you are having issues with it you can deactivate this feature at the site level using the below step.

Site Settings >>  Site Actions >>   Manage Site Features >>  Deactivate Minimal Download Strategy Feature.

Wednesday, October 29, 2014

How to Enable or Disable Document Property Promotion (ParserEnabled) in SharePoint 2013

This is the way to solve issues on uploading document into SharePoint 2013 Document Library. After upload the document into SharePoint library, the document had the metadata (document properties) of the original document. Metadata that is changed on the document will revert to the original values that were given to the document; this occurs both from SharePoint and from MS Word.
 
Solution 1 – Remove Document Properties & personal Information using Inspect
1.      Open file using Microsoft office
2.      Click file and the inspect document (check for issues)
3.      Tick only on document properties & personal information
4.      Inspect & then remove
5.      Then Save
6.      Upload document into SharePoint.
 
Solution 2 – Disable Document Property Promotion using PowerShell
The SPWeb object has a ParserEnabled property, which enables or disables this functionality.  Using the PowerShell script, we can turn off this functionality at the web level. Sample script to disable the document parser feature in SharePoint:
1.      Open the SharePoint 2013 Management Shell as Administrator.
2.      Run the following script to disable document property promotion.
 
C:\> $web
        Url
        ---
        http://spfe01/sites/SITENAME/SUBSITENAME
C:\> $web.parserenabled
        True
C:\> $web.parserenabled  = $false
C:\> $web.Update()
C:\> $web.parserenabled
        false
 
 
3.      Document Property Promotion is disabled successfully and when you try to upload a document you will find that all the fields are empty
 

Wednesday, October 8, 2014

Clear SharePoint Designer 2013 Cache

When using SharePoint Designer, especially in a development environment where content and assemblies can frequently change, SPD can start to behave erratically, sometimes loading content that has been removed from the web site, or using an older version of an assembly. This is due to how SPD caches content, which thankfully, is easy enough to clear.


Step 1: First, close SPD and then remove all files from the following folder:
%APPDATA%\Microsoft\Web Server Extensions\Cache

This contains things like page caches.

Step 2: Then, do the same for this folder:
%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

This contains cached items such as assemblies used and lots of other xml configuration files.

Step 3: Restart SPD and all should be good in the world

Reference: http://www.stuartroberts.net/index.php/2012/07/18/quick-tip-9/

Wednesday, April 2, 2014

sharepoint 2010 Position modal dialog box relative to current screen


Place this code @ css in master page

.ms-dlgContent
{
position: fixed!important;
}