
Bucketable Sitecore Sharepoint Connector
But when we take a look at the Sharepoint Connector, it doesnât support any items structure. All integration items are located under the root item. In our case there were five thousand documents - so the performance was dead.
According to the Sitecore Best Practices, each item should contain less than 100 child items. Otherwise it will impact the performance. Especially of the Content Editor.
But when we take a look at the Sharepoint Connector, it doesn’t support any items structure. All integration items are located under the root item. In our case there were five thousand documents - so the performance was dead đ
Thank God, the Sharepoint Connector is very easy to customize. So let’s do it:
The integration process runs in the “synchronizeTree” pipeline where the process “GetSitecoreItemList” retrieves the list of the integration items under your documents root item.
Here is the code:
public class GetSitecoreItemList
{
public void Process(Sitecore.Sharepoint.Pipelines.SynchronizeTree.SynchronizeTreeArgs args)
{
Assert.ArgumentNotNull(args, "args");
Assert.IsNotNull(args.Context, "Value can't be null: args.Context");
args.IntegrationItems = (from x in args.Context.ParentItem.Children.Where
Our code should be like this:
public void Process(Sitecore.Sharepoint.Pipelines.SynchronizeTree.SynchronizeTreeArgs args)
{
Assert.ArgumentNotNull(args, "args");
Assert.IsNotNull(args.Context, "Value can't be null: args.Context");
args.IntegrationItems = (from x in args.Context.ParentItem.Axes.GetDescendants().Where(SharepointProvider.IsIntegrationItem) select new Sitecore.Sharepoint.Data.Providers.Items.IntegrationItem(x)).ToList();
FanucLog.Debug("GetSitecoreItemList : {0} Integration Items Found".FormatWith(args.IntegrationItems.Count));
}
Do not forget to update the config
Now set the integration items as bucketable using the standard values and set the root item as Bucket: