Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


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

Monday, December 26, 2016

Move documents along with versioning

Keep in mind that below approach works only within the site collection level.  I mean to say here is it is not possible to move the documents between libraries across site collection levels.

The best approach to move the documents between the libraries along with versioning is using “site content structure” option. 

Note: But one thing we should keep in mind that versioning shoould be enabled in both the source and destination document libraries.

Steps to move the documents between document libraries:

Step1: Go to Site Actions -> Site Settings.  Under “Site Administration” click “Content and structure”

Step2: Find the source library and select the all or any specific documents you want to move and then click “Actions”à Move.

That’s it. Now, go and visit the destination document library. You will get the moved documents along with its versioning’s.

One thing I observed here is, along with the documents versioning, metadata also would came.
I have a created a source document library and created 3 custom columns with different types. Uploaded the new document along with the metadata and then moved this document to destination library.

In addition to the versioning in destination library  what ever the columns available in source got created the same in destination( means 3 custom columns which are all created by me on source library are also available in destination library).

Source library:


Destination library:



Happy Sharepoint.

Please take a momenet and do comments if this post really helps

Get sharepoint Host Web Url using REST

Just do copy paste the below code and execute it.


Note: The below shared code is 100% verified/executed.


Appmanifest.xml:

Set read level permisisons to the web

Default.aspx:

The host web title is: <label id="HostwebTitle"></label>

app.js:

var hostweburl;
var appweburl;

// Load the required SharePoint libraries
$(document).ready(function () {
    appweburl = window.location.protocol + "//" + window.location.host + _spPageContextInfo.webServerRelativeUrl;
    hostweburl = _spPageContextInfo.siteAbsoluteUrl;

    // resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";

    // Load the js file and continue to the
    //   success event handler
    //$.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequest);
    $.getScript(scriptbase + "SP.js", execCrossDomainRequest);
});

// Function to prepare and issue the request to get
//  SharePoint data
function execCrossDomainRequest() {
    var executor;

    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);

    // Issue the call against the host web.
    // To get the title using REST we can hit the endpoint:
    //      app_web_url/_api/SP.AppContextSite(@target)/web/title?@target='siteUrl'
    // The response formats the data in the JSON format.
    // The functions successHandler and errorHandler attend the
    //      success and error events respectively.
    executor.executeAsync(
        {
            url:
                appweburl +
                "/_api/SP.AppContextSite(@target)/web/title?@target='" +
                hostweburl + "'",
            method: "GET",
            headers: { "Accept": "application/json; odata=verbose" },
            success: successHandler,
            error: errorHandler
        }
    );
}

// Function to handle the success event.
// Prints the host web's title to the page.
function successHandler(data) {
    var jsonObject = JSON.parse(data.body);


    document.getElementById("HostwebTitle").innerHTML =
        "<b>" + jsonObject.d.Title + "</b>";
}

// Function to handle the error event.
// Prints the error message to the page.
function errorHandler(data, errorCode, errorMessage) {
    document.getElementById("HostwebTitle").innerText =
        "Could not complete cross-domain call: " + errorMessage;
}

// Function to retrieve a query string value.
// For production purposes you may want to use
//  a library to handle the query string.
function getQueryStringParameter(paramToRetrieve) {
    var params =
        document.URL.split("?")[1].split("&");
    var strParams = "";
    for (var i = 0; i < params.length; i = i + 1) {
        var singleParam = params[i].split("=");
        if (singleParam[0] == paramToRetrieve)
            return singleParam[1];
    }
}

Thanks for visting.. Happy Sharepoint

Please take a moment and do comments on it if its really helped you.

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.

Saturday, September 5, 2015

SharePoint list view web address is not displaying the absolute URL

Issue: SharePoint list web address is not displaying the absolute URL:

Description: Recently, we migrated SharePoint 2010 applications to 2013. While doing content validation in SP2013 to check whether all the metadata is migrated properly, we found an issue that most of the list web address is not showing the complete view URL. It is just showing web application URL.

Solution: You will face such type of issues if no view set as by default to the list. Check the list views and set any of the view by default and check, it will show the complete view URL.

Regards,
Sasi Kumar Reddy
sharepointquicksolutions.blogspot.in





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, June 19, 2015

Solve edit page not working issue


Edit the sharepoint page:

Append the below one to the url if you are unable to edit the sharepoint pages and then now try to click on edit page option. problem solved.

?toolpaneview=2

Example:

URL: http://abc.com/sitepages/Home.aspx?toolpaneview=2

Please let me know for any issues.

Regards,
Sasi Kumar Reddy


Saturday, May 16, 2015

ExportVsImport: SharePoint interview questions with answers

Export and Import limitations:
Major drawback: The export/import does not preserve workflows instances, associations, history and tasks. Every workflow association must be recreated and there is no way to restore the running instances from original site.
If publishing feature is enabled in source site and same should be applicable for targeted site also.

How can we do the export/import of site, list and libraries along with versioning?
Use the [-IncludeVersions] option to instruct PowerShell to include version information of items in the export file.
Example:
Export-SPWeb -Identity http://sharepoint/site -Path "E:\exports\MySite.cmp" -IncludeVersions ALL

Export the sites, lists and libraries?
To export/import a specific list or library, provide the full URL to the list or library, otherwise PowerShell will import/export the site if the URL is to the main site location.
Include the [-IncludeVersions] option to instruct PowerShell to include version information of items in the export file.
Include the [-NoFileCompression] option to turn off file compression; this makes for a faster export but larger files on disk.
Include the -haltonfatalerror or -haltonwarning options to stop the import\export process in the event of an error or warning.
In SharePoint 2007, administrators could export and import sites only, using STSADM

Export and Import use in sharepoint?
Backup-SPSite is generally used when you want to replicate the entire site collection (including all subsites) to an existing web application.
Export-SPWeb is generally used when you want to replicate just a single subsite to an existing site collection.
From SP2010 onwards, you can export a site, lists and library through either central adminitrator or poweshell but we can only way to do import is through powershell.

Limitations:
Workflows are not included when we export/import contents of sites, libraries, or lists means Export-SPWeb does not export the running workflows.
Export-SPWeb:
Paramaters:  NoFileCompression,

Note: The NoFileCompression parameter lets you specify that no file compression is performed during the export process. Using this parameter can lower resource usage up to 30% during the export process. Using this parameter will result in a backup folder being created instead of a compressed file. If you use the NoFileCompression parameter in the Export-SPWeb command, you must also use it when you import the content by using the Import-SPWeb command.
includeusersecurity : Do not forget to use includeusersecurity parameter in both export and import if you wish to preserve information relative to permissions and other properties such as documents authors.

Friday, April 3, 2015

Restore-SPSite problems in sharepoint

I have a requirement change the site collection URL (path based). Best recommended way to change the site collection URL in sharepoint 2010 is backup and restore. I followed the same, first I took the backup and then trying to restore the same but it giving exception.

Observation: Restoration fails if any of the URL characters exceed the limit of 260 characters. So, please check the URL characters before proceeds with backup and restore.

Below script will give the accurate results of the URL characters:

Step1:  connect to the DB server and then select the content DB

Step2: Run the script

SELECT
   ([DirName]+ N'/'+ [LeafName]) AS [FullRelativePath],
   LEN([DirName]+ N'/'+ [LeafName]) AS [Length]
FROM
   [dbo].[AllDocs]
ORDER BY
   [Length] DESC


Note: If any of the URL characters exceeds the 260 characters, please make it below and then try to do the back up and restore.

-Thanks,
Sasi kumar Reddy

Thursday, April 2, 2015

Solving access denied login for site collection administrators

Recently we migrated the applications from sharepoint 2007 to 2010. Once it’s done, we tried to browse the application but it is giving access denied error. Initially I thought it was due to access issue but I am the primary site collection administrator to that application.

Workaround:  Check status of the content DB whether it is in read-only or not locked stage. If it is in read-only, change it to “Not locked” and then save it.

Now try to browse the application and this time you can able to browse.

Regards,
Sasi Kumar Reddy




Tuesday, February 24, 2015

Crawled Vs Managed properties: Search


  1. How to create crawled and managed properties?
  2. Are managed properties works at web application, site collection and site level?
  3. How to map crawled properties with managed properties?
  4. When full crawl is required?
  5. Automatically creation of managed properties not supports what are all data types?
  6. New features introduced in SP2013?
  7. Is full crawl required for each map between crawled and managed property?
  8. Difference between creating crawled property at SSA level and site collection level?
  9. I have created one managed property of type “Text”. As per the current requirement I want to change it “Choice”. Is it possible?
  10. I have created one site column of type “Single line of text”. As per the new feature introduced from the sharepoint 2013, automatically managed property will create for each site column creation. So far everything is clear. Now my question is will change the data type of managed property as changed at the site column level?
  11. I have two different lists in site and there is one common field in both the list. Now, I want to map that field to the managed property?
  12. Limitations on automatically creation of managed property for the site columns?

New features introduced on managed and crawled properties in SP2013?

From SP2013 onwards, only site columns that contain values will automatically become managed properties when they are crawled and full crawl is required.
In sp2010, whenever a new item was discovered during a crawl, users would have to manually create a new managed property, and map this to the corresponding crawled property.

What is the use of creating managed properties and why mapping required to the crawled properties?
Crawled properties are useless(means can’t be searchable/not us in Refinable)  without mapping it to the Managed properties and next point why mapping required is we can assign behaving similar ways of crawled properties to one managed properties.
To include the content and metadata of crawled properties in the search index, you map crawled properties to managed properties.

Example: Modified By, Created By and Author crawled properties behaves in similar way. Rather performing individual assign all 3 to one managed property called “Author” [see the below image]



Is full crawl required for each map between crawled and managed property?
Yes, Full crawl should be required.

When full crawl is required?
When you create a new managed property, or when you change certain settings on existing managed properties, a full crawl must complete before the managed property and its value is included in the search index.
When you have changed a managed property, or when you have changed the mapping of crawled and managed properties, the site must be re-crawled before your changes will be reflected in the search index. Because your changes are made in the search schema, and not to the actual site, the crawler will not automatically re-index the site.

Are managed properties works at web application, site collection and site level?
At site collection level.

Automatically creation of managed properties not supports what are all data types?
Managed properties are created automatically for site columns that contain values during crawl and it’s mapped to crawled properties (Note: All spaces are removed). But automatic creations of managed properties are not supported for the following site column types:

  • Lookup
  • Calculated
  • Task outcome
  • Summary Links data
  • Rich media data for publishing
Difference between creating managed properties at site collection level and SSA level?
Big differences between managed properties created in the site collection versus the SSA are that when you create new managed properties in the site collection they have the below limitations you should be aware of:

  • They can only be text and Yes/No
  • They cannot be sortable
  • They cannot be refinable
  • They cannot allow multiple values


I have created one site column of type “Single line of text”. As per the new feature introduced from the sharepoint 2013, automatically managed property will create for each site column creation. So far everything is clear. Now my question is will change the data type of managed property as changed at the site column level?
I have created a site column name:
Column name: MyDateTimeCol
Managed property Name: MyDateTimeColOWSDATE
And changed the date time column type to “Choice”
Column name: MyDateTimeCol
Managed property name: MyDateTimeColOWSCHCS
Note: What I observed is managed property will create for each field type change.
Auto-generated managed property is by default non-refinable.

Limitations on automatically creation of managed property for the site columns?
Limitation#1:
Managed properties are automatically created for the site columns but drawback here is they generated is always of “text” data type only.

Means by which data type if we create the site column, the managed property should create with of same type. But by default sharepoint generate the “text” data type.
Example: I have created a site column of data type “Choice”. Managed property generated for this choice column is of “Text” type.

We cannot change the types of managed properties once generated.
Example: I have created a site column of data type “Choice”. Managed property generated for this choice column is of “Text” type and then tries to change the type. Not possible.
I have created a managed property of type “Text” at SSA level and try to change the type. Not possible.

Limitation#2:
We cannot set the refinable.

I have created one managed property of type “Text”. As per the current requirement I want to change it “Choice”. Is it possible to make changes for the existing one?
Am sure it is not possible with CA. Will confirm on through PowerShell script.


How to change the type of managed property once generated/created?

Through browser it is not possible to change the type of the managed properties. Only way is through PowerShell script.


What are all the ways to create crawled properties?
Crawled properties are added automatically by the crawl components
Cannot be added via CA or search admin pages
Can be added via PowerShell script