vendredi 16 septembre 2016

Fix Organizational Browser for sharePoint 2016

Due to the fact that sharepoint 2016 use claim authentication organizational browser doesn't work anymore.

In order to fix this issue simply add the following script into the page just after your webpart:


<script type="text/javascript">

function CreateHierarchyChartControl(parentId, profileId, type, persistControlId, flowDirection, silverLightControlId)
{
var i = profileId.indexOf("|");
var claimsmode = profileId.substr(i-1,1);

if((i >=0 ) & (claimsmode=="w"))
{
profileId = profileId.substr(i+1,profileId.length-i-1);

//var initParam = profileId + ',' + type + ',' + persistControlId;
var initParam = profileId + ',' + type + ',' + persistControlId + ',' + flowDirection + ',' + silverLightControlId;

var host = document.getElementById(parentId);
host.setAttribute('width', '100%');
host.setAttribute('height', '100%');

Silverlight.createObject('/_layouts/ClientBin/hierarchychart.xap',
host,'ProfileBrowserSilverlightControl',
{
top: '30',
width: '100%',
height: '100%',
version: '2.0',
isWindowless: 'true',
enableHtmlAccess: 'true'
},
{
onLoad: OnHierarchyChartLoaded
}, initParam, null);
}
}
</script>

Aucun commentaire :

Enregistrer un commentaire