1

Anyone know if there is a way to rebuild specific items in link database through a custom script targeting specific items to rebuild links to?

OOB Sitecore only supports rebuilding the whole link database and depending on the size this could take many hours.

1

The simplest method is just save that item. Sitecore will do the rest.

There is an event handle:

<handler type="Sitecore.Links.ItemEventHandler, Sitecore.Kernel" method="OnItemSaved"/>

It calls

`LinkDatabase.UpdateItemVersionReferences` method passing saved item.

Another option is to call

Sitecore.Globals.LinkDatabase.UpdateItemVersionReferences

or

Sitecore.Globals.LinkDatabase.UpdateReferences

from custom code or script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.