Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |
Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Saturday, June 18, 2016

Lists and Libraries: Class Day3

In this article, We will cover below mentioned topics on SharePoint Lists and libraries. please feel free to reach me if have any clarifications or more information required on it.

Topics:
1) List and Library
2) site columns and List columns
3) site content type and list content type
4) Views
4) Cascade Delete
5) Restrict Delete
6) Enforce uniqueness
7) Calculated columns
8) lookup columns
9) Permissions
10) List Threshold
11) Indexing
12) Versioning, Checked-In/Out and Publish
13) Update Vs SystemUpdate Vs UpdateOverWriteversion
14) SharePoint real-time scenarios
15) SharePoint interview questions and answers
16) Read-Only columns(Eg: Created/Created By, Modified/Modified By etc..).\
17) File URL length restriction.
18) SPBuiltInFieldId


Basics on the List and Libraries:
  1. By default, Content type option is disabled at the list/library: To enable it: Go to list/library settings-->Advanced settings--> Make it as "Yes" to allow management of content type.
  2. By default, Threshold limit for the user:5000 items and for administrators: 20000. These values are hard-coded at the central admin level but Microsoft recommended is should not increase/change the default threshold values to avoid the performance issues.
  3. Best practice to handle the threshold: 1) Indexing the columns 2) Avoid threshold exception by maintaining the data/items in a folder structure( SharePoint considers Folder is an item and we can maintain 2000 items in it).
  4. Always go with the internal column names(Reason: Display name can be modified but internal can't be modified) to fetch the data and update an items.
  5. Go with the creating site columns option rather creating it in each list/library if the same column is used in more than one lists/libraries.
  6. Go with the site content types option if more than one site columns needs to preferred in the each lists/libraries.
  7. In views, Filter by [Me] if wants to show the results of current logged user only.
  8. Upload size limit of files to the document library is: By default: 50MB and max 2GB(SP2013) and max 10GB(SP2016).
  9. The files into the library should always be in published mode to get the updated changes by others.
  10. By default, SharePoint recommended support for indexing is 20.
  11. SharePoint handles the permissions at the lists/libraries and even items level also.
  12. Only option to change the list/library URL is through SharePoint designer.
  13. By default list/library permissions are inherited from parent but we can have an option to maintain the unique permissions at it.
  14. We don't have an option to add users/groups directly at the lists/library level in inheritance mode. If needs, break the inheritance and then add users/groups.
  15. Users should have minimum "contribute" level permissions to make CRUD operation at the list/library.
  16. Steps to support large files upload: 1) Increase the default value(Default: 50MB and Max support: 2GB) to the desired value 2) Increase the IIS request length 3) Increase the IIS connection timeout length. https://angler.wordpress.com/2012/03/21/increase-the-sharepoint-2010-upload-file-size-limit/ 
Please go the below articles for complete details:

RunWithElevatedprivileges
http://sharepointquicksolutions.blogspot.in/2012/11/all-ways-of-runwithelevatedprivileges.html

AllowUnsafeUpdates
http://sharepointquicksolutions.blogspot.in/2012/03/whenwherewhy-use-allowunsafeupdates-in.html

ForDigest Control
http://sharepointquicksolutions.blogspot.in/2012/03/wherewhenwhy-formdigest-control.html

Interviews questions with answers:
http://sharepointquicksolutions.blogspot.in/2013/01/list-vs-library-sharepoint-interview.html
http://sharepointquicksolutions.blogspot.in/2015/07/sharepoint-faqslistvslibrary.html
http://sharepointquicksolutions.blogspot.in/2012/06/content-types-in-sharepoint.html

PowerShell Scripts:
http://sharepointquicksolutions.blogspot.in//search/label/PowerShell


Your valuable suggestions/feedback helps me to give best outputs/results.

Wednesday, July 8, 2015

Sharepoint interview questions with answers: lists and library

I had faced below listed issues while doing migration from SharePoint 2007/2010 to 2013:

Quick Edit view issue:

Quick Edit view: Result: Get "Assertion Failed: Break into debugger?"
We applied the JavaScript at master page level, issue solved.

“Files” and “library” option are not available by default in ribbon for document library:
Issue is it will be disabled if you add any web part to the OOB pages (like CEWP)

By default, SharePoint limitation for Size of URL is 260 characters.
You might get the below exception if exceed the limit:
Exception: The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name.

Note: Microsoft recommended size limit for single file name is 128 characters and URL limit is 260 characters.

I have uploaded one document to the document library and when I open it through browser the size of the URL is 258 characters(max limit 260) and later on I have changed the web application “http://India.com to http://allindia.test.IND.com and now my the document size of the URL is 263 characters(means exceeded the limit). My Question how the SharePoint handles these types of scenarios?

As per my analysis: you can’t edit/download the document but we can view the document through browser.

View the large number of records in SharePoint list/library:
We can view the large number of records (around 1lac) by removing the filters, group by/sort by and select the “Show items without folders” option.

Export to excel the list item with attachments:
We can achieve it by using the "Open with access" option. From there if wants we can directly download from the access.

Export to excel the list item with attachments URLs:
We can achieve it by using web service concept in Nintex

Export to Excel”. Keep in mind that you can’t export a list that has more than 52,000 items;            


Friday, January 23, 2015

sharepoint interview questions with answers: ListVsLibrary

<<Previous post>>

Move documents between document libraries along with versions?
You can only copy the documents to others along with major version only.

Exception: “The data source control failed to execute the update command
Got the above exception while trying to attach the file to the list item in MOSS2007
The reason for the exception is attaching file name exceeded the limit (max size limit for single file is 128 characters).

Exception: “The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name”
By default, SharePoint limitation for Size of URL is 260 characters.
Microsoft recommended size limit for single file name is 128 characters and URL limit is 260 characters. 
I have uploaded one document to the document library and when I open it through browser the size of the URL is 258 characters(max limit 260) and later on I have changed the web application “http://India.com” tohttp://allindia.test.IND.com and now my the document size of the URL is 263 characters(means exceeded the limit).

As per my understanding: you can’t edit/download the document but we can view the document through browser.

Thursday, September 25, 2014

create sharepoint boolean field using powershell script

Please visit my below post which helps on how to create sharepoint list using powershell script:
Create sharepoint list using powershell script

Note: By default, below method sets the boolean field as Yes(1). If you want as No(0), provide the 0 value to the "DefaultValue"
****************************************************************************************
$lncustomListName listName
$docSite = new-object Microsoft.SharePoint.SPSite($siteURL)
$docWeb = $docSite.OpenWeb()

/* To create Boolean field */
Add-SPBooleanField -listName $lncustomListName -Name EmailFlag -DisplayName EmailFlag -Required TRUE -DefaultValue 1

/* Method to create boolean field */
function Add-SPBooleanField([string]$listName, [string]$DisplayName, [string]$Name, [string]$Required,[string]$DefaultValue)
{
  $OpenList = $docWeb.Lists[$listName]
  $fldXml = "<Field Type='Boolean' DisplayName='"+$DisplayName +"' Required='"+ $Required +"' Name='"+ $Name +"'>
           <Default>$DefaultValue</Default>
           </Field>"
  $OpenList.Fields.AddFieldAsXml($fldXml,$true,
  [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)
}

*****************************************************************************************
Please let me know if faced any issues.

Sunday, September 21, 2014

Create sharepoint datetime control using powershell script

Visit my previous post for to create a list through powershell script
Create list using powershell script
*********************************************************************************
$lncustomListName listName
$docSite = new-object Microsoft.SharePoint.SPSite($siteURL)
$docWeb = $docSite.OpenWeb()

/* To create DateTime field for allow only one user/group */
Add-SPDateTimeField -listName $lncustomListName -Name DateTimeFieldName  -DisplayName DateTimeFieldName  -DateType DateOnly -Required FALSE

/* Method to create people DateTime field */
function Add-SPDateTimeField([string]$listName, [string]$DisplayName, [string]$Name, [string]$Required, [string]$DateType)
{
   $OpenList = $docWeb.Lists[$listName]
   $fldXml = "<Field Type='DateTime' DisplayName='"+ $DisplayName +"' Format='"+ $DateType +"' Required='"+ $Required +"' Name='"+ $Name +"'/>"
   $OpenList.Fields.AddFieldAsXml($fldXml,$true,
   [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)
}
**********************************************************************************
Please let me know if faced any issues.

Saturday, September 13, 2014

Create sharepoint multi people picker field through powershell script

Visit my previous post for to create a list through powershell script and to create people picker for allow single user/group
Create a new sharepoint list using powershell script
Create a people picker column to allow single user/group

**********************************************************************************
$lncustomListName listName
$docSite = new-object Microsoft.SharePoint.SPSite($siteURL)
$docWeb = $docSite.OpenWeb()

/* To create people picker field for allow mutliple users and groups */

Add-SPUserField -listName $lncustomListName -DisplayName MyList -Name MyList -Required TRUE

function Add-SPMultiUserField([string]$listName, [string]$DisplayName, [string]$Name, [string]$Required)
{
   $OpenList = $docWeb.Lists[$listName]
   $fldXml = "<Field Type='User' DisplayName='"+ $DisplayName +"' Required='"+ $Required +"' Name='"+ $Name +"'/>"
   $OpenList.Fields.AddFieldAsXml($fldXml,$true,
   [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)
   $fieldname=$OpenList.Fields[$DisplayName]
   $fieldname.AllowMultipleValues=$true
   $fieldname.update()  
}
*********************************************************************************

Create sharepoint People Picker field through powershell script

Visit my previous post for to create a list through powershell script
Create list using powershell script

********************************************************************************
$lncustomListName listName
$docSite = new-object Microsoft.SharePoint.SPSite($siteURL)
$docWeb = $docSite.OpenWeb()

/* To create people picker field for allow only one user/group */
Add-SPUserField -listName $lncustomListName -DisplayName MyList -Name MyList -Required TRUE

/* Method to create people picker field
function Add-SPUserField([string]$listName, [string]$DisplayName, [string]$Name, [string]$Required)
{
   $OpenList = $docWeb.Lists[$listName]
   $fldXml = "<Field Type='User' DisplayName='"+ $DisplayName +"' Required='"+ $Required +"' Name='"+ $Name +"'/>"
   $OpenList.Fields.AddFieldAsXml($fldXml,$true,
   [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)   
}
*******************************************************************************
Please let me know if faced any issues.

Wednesday, September 3, 2014

SharePoint administrator interview questions and answers: Recycle Bin 2


<<Previous page>>                                                                                            


How can we restore the deleted sub site from the Recycle Bin in SharePoint 2007?
There is no direct way to restore the deleted sites from the Recycle Bin in SharePoint 2007. But there was a wonderful tool from Codeplex: Site Delete Capture http://governance.codeplex.com/ to back up sites automatically when they gets deleted, So that we can restore a deleted site collection in SharePoint 2007.

From the SharePoint 2010 onwards, we can restore the deleted sub site from the second stage of recycle Bin. If we delete the sub site, SharePoint will keep the deleted site in site collection recycle bin.
Note: You can find the deleted site secondary recycle bin i.e  “Deleted from end user Recycle Bin

Is it possible to recreate the deleted site in sharepoint? [Means i have deleted a  site(http://ab.com) and trying to recreate with the same]?
Sol: In MOSS2007, When you delete a Site from the site settings it is deleted permanently. That meanns we can able to recreate the same once got deleted but from SharePoint 2010 onwards, When you delete a Site from the site settings it is deleted gradually.
Means, if you delete a site, and then create the site with the same name, SharePoint will ask you if you wish to permanently delete the site from the recycle bin so that you can re-create the site


How to restore the deleted site collection in SharePoint?
In prior versions of SharePoint Server 2010, if a site collection (that is, an SPSite object) was accidentally deleted, there was not a direct way of restoring a specific deleted site collection. The only method to restore a deleted site collection was to restore the entire farm from a backup. This was costly and time consuming, and typically was not performed.

When a site collection is accidentally deleted in SharePoint Server 2010 with SP1, the deleted site collection is stored in the SPDeletedSite object, not the SPSite object. Therefore, to restore a deleted site collection, you must use the Restore-SPDeletedSite Windows PowerShell cmdlet or programmatically access the object model.

E.g.:  Get-SPDeletedSite -Identity /sites/sitename | Restore-SPDeletedSite

My SharePoint site has exceeded the mentioned  Quota size limit but users still wants to add new doc to the document library? How can we achieve this?
Shorter way: Delete the unwanted data from the second stage of Recycle Bin.

Longer way: Increase Quota limit to the web application.

Note: Go with the second option only in case of if there is no unwanted data available in Recycle Bin. But keep in mind Release required to change the Quota limit [Why I mentioned “Release” point here we cannot directly change anything until unless get approval from the business users in higher level organizations].

Realtime Scenerio: I created site with 200MB of size and uploaded 200MB size of files to the document library[e.g:  2files and each one is having 100MB of size]. Later on, deleted those documents from the document library. But when I try to upload the 50MB of file again to the document library got the exception and it says: site Quota is FULL.
The reason for the exception is, those deleted 200MB files are still stays in first stage of Recycle Bin. Solution: Delete those from the both first stage/second stage Recycle Bin and then try to upload or increase the site Quota.

Note :2nd stage of Recyle Bin, overwritten the old data when it exceeds.

<<Previous page>>                                                                                            

SharePoint administrator interview questions and answers: Recycle Bin

<<Previous page>>                                                                                            

What is Recycle Bin in sharepoint?
SharePoint has introduced a new feature called Recycle Bin to keep the deleted items, documents. Speciality of this feature is we can easily restore the accidently deleted items and files from the Reycle Bin. 

Recycle Bin Stages:
SharePoint supports two levels of Recycle bin. The initial or First level Recycle bin comes into picture when the user deletes an item from a list. Once the item is deleted again from the First level of Recycle bin it moves to the second stage of Recycle bin.
1st stage, known as the “end user recycle bin”
2nd stage, known as the “deleted from end user recycle bin”.
2nd stage Recycle Bin has a setting of site quotas for space limitations. If it reaches its quota limit, older items will be overwritten. If you are not enabled site quotas then 2nd stage recycle bin will have no space limitations.

Use the 2nd Stage Recycle Bin to define how long deleted items will stay in the site collection's Recycle Bin that only the administrator can use (Default: 50 percent of the disk quota for the web application. For example, if you have allotted 1000 MB of space for the web application, SharePoint will add 50 percent more (i.e., 500 MB) to that quota (a total quota of 1500 MB) to be used for the second-level Recycle Bin. When this limit is exceeded, the oldest items will be removed from the second stage Recycle Bin.
Note: First stage of Recycle Bin available at site level and only one Second Stage Recycle Bin available per Site Collection.

Below IMP points should keep in mind ever:
  1. The Site Recycle Bin feature is newly introduced in Service Pack 1 from SharePoint 2010, if you haven't installed ServicPack 1 for your SharePoint 2010 when you deleted the site collection; you need to restore the content database.
  2. The Recycle Bins can contain multiple copies of a document that each have the same file name and source. These documents cannot be restored over an existing copy of a document.
  3. The Recycle Bins cannot be used to recover previous versions or accidental overwrites of documents.
  4. Turning off the Recycle Bin for a Web application empties all Recycle Bins and permanently deletes all items in them and can only be restore from a backup.
  5.  If you have not enabled site quotas, the 2nd stage recycle bin will have no space limitations.

Who can view the 1st stage recycle Bin?
Minimum Permssions levels: Contribute, Design, or Full Control Permissions and site collection administrator.

What are all the minimal permissions required to restore the deleted items?
The deleted items can only view of their own and site collection administrator.
Recycle bin access permissions: Contribute , Design, and Full Control permissions.

What are all the permissions required to restore the deleted objects from the second stage of Recycle Bin?
Only the Site Administrator can restore objects from the site collection Recycle Bin.
You should have minimum site collection administrator permissions to restore the other’s deleted data from the Recycle Bin. Means the users who have deleted the content will be able to see the content in the recycle bin and next site collection administrators can view other’s data.

How many days the deleted content will be available in Recycle Bin?
The deleted object will stay in the Recycle Bin for 30 days by default.
After 30 days, the object is moved from the site's Recycle Bin to a site collection Recycle Bin.
All together is 30days: If deletes the item from the first stage recycle bin after 10 days. It moves to second stage recyle bin and stays there another remanining 20days. 

Which timer job cleans the recycle bin data if exceeded the time?
The “Recycle Bin” Timer job and it by default scheduled on daily basis in MOSS2007 and from 2010 onwards scheduled on weekly basis.

How to delete an item permanently from the SharePoint list?
Recycle () method: used for to move the items to the Recycle Bin
Delete () methods: used for to delete the items permanently.

<<Previous page>>                                                                                            

Friday, August 29, 2014

set default values to the SharePoint Rich Text field using JQuery

Add the new content editor web part to the page and copy/paste the below script.

Note: Before do copy/paste, keep in mind about references.

<script language="javascript" src="/Style%20Library/jquery-1.10.2.min.js" type="text/javascript"></script>
<script language="Javascript" type="text/Javascript">
$(document).ready(function() {   
       $('nobr:contains("MultiLineOfTextCol")').closest('tr').find('input[id$="TextField_spSave"]').val('Hello World !!!');
    });
</script>

Happy Scripting...
Please let me know for any issues.


Friday, July 18, 2014

Sharepoint multiple lines of text column validation using JQuery

This post will help us on below validations:
  1. Required field validation
  2. clear the multiline of text value


//Get the multiline of text value
var multilineoftext = RTE_GetRichEditTextOnly("<%= txtComments.ClientID %>");

if (multilineoftext == '') {

alert("Multiline of text value is required");

}

//To clear multi line of text value

RTE_GetEditorDocument("<%=txtComments.ClientID %>").body.innerText = "";

Sunday, May 5, 2013

Add Button to sharepoint Ribbon control using visual studio 2012

In this task, you will add a custom action to the ribbon of all Document Libraries to launch the App.
  1. In Visual Studio, right click the HelloApp node and select AddØNew Item from the Context menu.
  2. In the New Item dialog, select Ribbon Custom Action.
  3. Name the item Launcher and click Add.

Saturday, May 4, 2013

Create Client Web Part to the App using visual studio 2012

In this task, you will add a Client Web Part and code it. This web part can be used on pages outside of the App to add functionality to the hosting SharePoint site.
  • Add a Client Web Part
    • In the Solution Explorer, right click the HelloApp project node and select Add-->New Item from the context menu.
    • In the Add New Item dialog, select Client Web Part.
    • Name the new item MyClientWebPart and click Add.