You can modify SiteIdForItem’s site selection algorithm by setting one or more input parameters. By default, SiteIdForItem only returns an enabled site. If desired, you can allow return of a site that is both inactive and disabled site by setting the input parameters includeInactiveSites
and includeDisabledSites
to true
.
Among all sites that are eligible to be returned, SiteIdForItem determines its selection by prioritizing the sites as follows:
The only site in the item’s
siteIds
list.The current site, if input parameter
currentSiteFirst
is set totrue
.The site ID specified by input parameter
siteId
.A site in a site group that shares the ShareableType specified by input parameter
shareableTypeId
.