Pages Side

Saturday, September 6, 2014

Organization Browser web part

by default the Organization Browser working on my site only but It's not working in different web application 

To add Organization Browser Web Part in different web Application ;you have to do the below steps

1. Active SharePoint Server stranded Site Collection feature under Site Setting>Site Collection features 

2. go to your page where you want to add the Web Part and insert it





Note : In SharePoint 2013, It has a problem in rendering but you can add the below script in content editor web part under Organization Browser web Part (Microsoft reference ) to resolve it
<script type="text/javascript">
 function CreateHierarchyChartControl(parentId, profileId, type, persistControlId) {
  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 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>