Posts Tagged ‘SharePoint 2013’

  • GeoLocation
  • Related Items (You will find this column in Task list)
GeoLocation 

 

Integrating location and map features SharePoint 2013 introducing new column type “geolocation”; New column GEO location added help to specify the location using BING map. By default this column not visible in the UI. You can add this column by code also available in MSDN link http://code.msdn.microsoft.com/office/SharePoint-2013-Add-a-d3fa8288/sourcecode?fileId=67748&pathId=1981093371
Above link shows how to create the geolocation using the Client object model.

 private static void AddGeolocationField()         {             // change “http:// localhost” with your sharepoint server name             ClientContext context = new ClientContext(@”http://Mysite&#8221;);             //Replace the <List Title> with valid list name.              List oList = context.Web.Lists.GetByTitle(“GeoLocationlist”);
//DisplayName will be displayed as the name of the newly added Location field on the list             oList.Fields.AddFieldAsXml(“<Field Type=’Geolocation’ DisplayName=’Location’/>”                                         , true, AddFieldOptions.AddToAllContentTypes);             oList.Update();              context.ExecuteQuery();         }

Creating a view from that list (another new view added in SharePoint 2013 called “Map view”)
Map View
MAp view
After creating the view you will see the below screen
MapView
Related Items
Related items column you will find inside the task list.

Related Items is hidden column. It is not available in the site columns. To add the columns in your custom list you need to change the column hidden property. Please read this blog to “Add the related items to the site column”.
“Related items” column not available in the new item form.
 Related Items
NewItemsIntask

 

But when you click on the view item from all items then you will able to see the button Add Related items.
 viewitems

 

View item form

 Addrelateditems

 

A modal pop up came up suggesting me to choose something related to link to page related to the site collection (any Asset).  You can add the multiple items to that filed but the related items window not allows you to select more than one items at a single time.
Assets
I have select the home page as a related item.

AddRelatedItems button

Some of the other columns

  • ParentID
  • AppAuthor
  • AppEditor
  • NoCrawl
  • PrincipalCount
  • Checkmark
  • RelatedLinks
  • MUILanguages
  • ContentLanguages
  • UserInfoHidden
  • IsFeatured
  • DisplayTemplateJSTemplateHidden
  • DisplayTemplateJSTargetControlType
  • DisplayTemplateJSIconUrl
  • DisplayTemplateJSTemplateType
  • DisplayTemplateJSTargetScope
  • DisplayTemplateJSTargetListTemplate
  • DisplayTemplateJSTargetContentType
  • DisplayTemplateJSConfigurationUrl
  • DefaultCssFile
  • RelatedItems
  • PreviouslyAssignedTo
Advertisements

SharePoint 2013 Minimal Download Strategy (MSD) new feature introduced by Microsoft that improving end user experience. I recently check the master page and find some interesting tags that used most at the top of the placeholders.i’e SharePoint:AjaxDelta Tag.

SharePoint:AjaxDelta wrapping all our favorite Delegate Controls and other elements in the Master Page. What this AjaxDelta control does is to only download to the client (browser) what has been changed since the previous download. If nothing has changed, nothing is downloaded Ajax Style.
Following are the AjaxDelta control that are available in the Master page.

  1. DeltaPlaceHolderAdditionalPageHead
  2. DeltaSPWebPartManager
  3. DeltaSuiteLinks
  4. DeltaSuiteBarRight
  5. DeltaSPNavigation
  6. DeltaWebPartAdderUpdatePanelContainer
  7. DeltaWebPartAdderUpdatePanelContainer
  8. DeltaTopNavigation
  9. DeltaSearch
  10. DeltaPlaceHolderPageTitleInTitleArea
  11. DeltaPlaceHolderPageDescription
  12. DeltaPlaceHolderLeftNavBar
  13. DeltaPlaceHolderMain
  14. DeltaFormDigest
  15. DeltaPlaceHolderUtilityContent
when you click on any of the page you will see the start.aspx page  and following by # then your site page URL. example http://xxx/_layouts/15/start.aspx#/SitePages/Home.aspx. The start.aspx page is responsible render the Delta changes control.

The Minimal Download Strategy is by default enabled on Team sites, Community sites but MDS is not enabled on publishing sites. MDS is a web feature.

What is Delegate control

  1. Delegate controls available in a SharePoint allow branding or substitution of common elements without altering master page.
  2. Substitute registered with control with lowest sequence number based on control ID.(Microsoft – here the default value is 100 so your sequence must be lower than this for your control to be loaded instead.)
  3. Parameters can be passed to the control via the declaration http://msdn.microsoft.com/en-us/library/ms463169.aspx

Type of Delegate

  1. Multi Delegate (Delegate Control load more than one user/server control.)
  2. Single Delegate

Multi Delegate: If delegate contains the “AllowMultipleControls=”true” ” attribute in the markup; It means the control is multi delegate control. it loads more than one user/server control, that has registered as lowest sequence number.

Single Delegate: If delegate without “AllowMultipleControls=”true” ” attribute in the markup; It means the controls only replace with the user control; that has registered as lowest sequence number.

HTML Example of Delegate control

<SharePoint:DelegateControl id=”ID_SuiteLinksDelegate” ControlId=”SuiteLinksDelegate” runat=”server” />

Following are the list of Delegate Controls available in SharePoint 2010, Highlighted are newly added in SharePoint 2013.

  1. AdditionalPageHead
  2. GlobalSiteLink0
  3. GlobalSiteLink2
  4. GlobalSiteLink3
  5. PublishingConsole
  6. PageHeader
  7. TopNavigationDataSource
  8. TreeViewAndDataSource
  9. PageFooter
  10. QuickLaunchDataSource
  11. SmallSearchInputBox
  12. GlobalNavigation
  13. SuiteBarBrandingDelegate (2013)
  14. SuiteLinksDelegate(2013)
  15. PromotedActions(2013)

I have created the solution that implemented SuiteBarBrandingDelegate, SuiteLinksDelegate and PromotedActions.

SuiteBarBrandingDelegate: It will change the top left bar. Here in my example I replace “SharePoint” with “My SharePoint Site”.

This is the HTML of the delegate control.

Replace this with 

SuiteLinksDelegate: Replace the left top links bar with custom links. As showing in the below images. Replace “Newsfeed, SkyDrive, Sites” with “About Us, Contact Us, Feedback” links.

Master Page SuiteLinksDelegate  HTML markup.

Replace with  with Image.
PromotedActions:  This is multi delegate control. Added link between “Share” and “Follow” links ie “Facebook” link. As showing below.
This is the HTML of the delegate control.


Replace this  with 

Feature Element file

Header before

After apply delegate control

Visual Studio Project

Most of the developer even don’t know the power of delegate control.

There are the different master pages available in the SharePoint 2013, so it could be possible you would not found all the above delegate control in master page. ex. “v4.master” page not containing the “PromotedActions” delegate control. This is only available in “oslo.master” page.

In SharePoint 2013 SharePoint:AjaxDelta wrapping all our favorite Delegate Controls and other elements in the Master Page. So now delegate control comes under the “SharePoint 2013 Minimal Download Strategy (MSD)” 

Attached code with this Post.

In SharePoint search the most of time people annoying that actual content and search content not in Sync. So the search administrator keeps hitting head on the wall and putting same excuse in front of stakeholders “please wait for the next incremental crawl, most of the time :)”. As we know we already have two content crawling methods first is “Full Crawl” and second is “Incremental crawl”.

 

Disadvantage of the “Full Crawl” and “Incremental Crawl” as both can’t run in a parallel i.e. the content change during the crawl, it required next incremental crawl.
So what is new in continues crawl?
The content source that using continues crawl that run in parallel. The default waiting time is 15 min. So the default wait time can change via PowerShell , no UI for that. Now the content is up to date most of the time. This crawler only for SharePoint content source, so the job of the SharePoint administrator need to identify those content which are keep updating on the regular interval & also comes under the part of search need to be comes under “Continues crawl “category. The “Continuous Crawl” is a type of crawl that aims to maintain the index as current as possible. So the following are list of crawl are available in SharePoint 2013 search architecture.
  1. Run By User
    • Full Crawl
    • Incremental Crawl
    • Continues crawl
  2. Run By system (automated crawl)
    • Incremental Crawl (clean-up)
  1. Run by User: The content source created by user/Administrator and it is trigger/ scheduled by the user.
    • Full Crawl: 
      • Crawl full items
      • Can be scheduled
      • Can be stop and paused
      • When required
        • Change content access account
        • Added new manage properties
        • Content enrichment web service codes change/modified.
        • Add new IFilter
    • Incremental Crawl:
      • Crawl last modified content
      • Can be scheduled
      • Can be stop and paused
      • When required
        • Crawl last modified content
    • Continues Crawl
      • Index as current as possible.
      • Cannot be scheduled
      • Cannot be stop and paused (Once started, a “Continuous Crawl” can’t be paused or stopped, you can just disable it.)
      • When required
        • Content frequently changed (Multiple instance can be run in parallel).
        • Only for SharePoint Content Source
        • E-commerce site in crass site publishing mode.
  2. Run by System: The crawl run automatically by the timer job.
    • Clean-Up continues crawl (Microsoft definition): A continuous crawl does not process or retry items that return errors more than three times. A “clean-up” incremental crawl automatically runs every four hours for content sources that have continuous crawl enabled to re-crawl any items that repeatedly return errors. This incremental crawl will try to crawl the item again and then will postpone retries if the error persists.

**********************************************************************************************************

SharePoint 2013: Continuous Crawl and the Difference Between Incremental and Continuous Crawl

With the new version of SharePoint a new type of crawl appeared in 2013 named « Continuous Crawl ».  For Old schools like me on SharePoint 2010 we had 2 crawls available and configurable on our Search Service Application.

  • Full : Crawl all content,
  • Incremental : As the name is says, it crawls content has been modified since the last crawl.

The disadvantage of these crawls, is that once launched, you are not able to launch a second in parallel (on the same content source), and therefore the content changed in the meantime we will need to wait until the current crawl is finished (crawl and another) to be integrated into the index, and therefore to be found via search. An example :

  • A incremental crawl named ALFA is started and will last 50 take minutes,
  • After 10 minutes of crawling a new document has been added, so we need a second incremental crawl named BETA to get the document in the index.
  • This item will have to wait at least 40 minutes to be integrated into the index.

 

So, we can’t keep an updated index with the latest changes, because latency is invited in each crawling process. It is possible that in most of cases this operation is suitable and favorable for your clients, but for those who want to search their content immediately or after their integration into SharePoint there is now a new solution in SharePoint: “Continuous Crawl“.

 

The Continuous Crawl  So resuming: The “Continuous Crawl” is a type of crawl that aims to maintain the index as current as possible.

His operation is simple: once activated, it will launch the crawl at regular intervals. The major difference with incremental crawl is that the crawl can run in parallel, and do not expect that the crawl is completed prior to launch.

Important Points:

  • “Continuous Crawl” is only available for sources of content type “SharePoint Sites”
  •  By default, a new crawl is run every 15 minutes, but the SharePoint administrator can change this interval using the PowerShell cmdlet Set-SPEnterpriseSearchCrawlContentSource  ,
  • Once started, a “Continuous Crawl” can’t be paused or stopped, you can just disable it.

If we take our example above with “Continuous Crawl”:

  •  Our ALFA crawl starts and will take at least 50 minutes,
  •  After 10 minutes of crawling an item already crawl is hereby amended, and requires a new crawl.
  •  Crawl “BETA” is launched,
  •  The crawl “BETA” starts in (15-10) minutes,
  •  Therefore this item will not need to wait 5 minutes (instead of 50 minutes) to be integrated into the index.

 

 

1- How to Enable it?

In Central Administration, click on your search service application, and then in the menu on the “Content Sources”

 

Clique on « New Content Source » at the menu

 

Chose « SharePoint Sites »

  

Select « Enable Continuous Crawls »

  

 

  • The content source has been created so we can see his status on « Crawling Continuous »

 

2 – How to disable it?

  •  From the content source page, chose the option “Enable Incremental Crawls” option. This will disable the continuous crawl.
  •  Save changes.

 

3 – How to see if it works ?

Click on your service application search then “Crawl Log” in the section “Diagnostics”.

 

Select your Content Source and click on « View crawl history »

Or via PowerShell Execute the followoing cmdlets  $SearchSA = « Search Service» Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SearchSA | select *

 

Impact on our Servers

The impact of a “Continuous Crawl” is the same as an incremental crawl. At the parallel execution of crawls, the “Continuous Crawl” within the parameters defined in the “Crawler Impact Rule” which controls the maximum number of requests that can be executed by the server (default 8).