I have the Org-Chart setup on SP13 Enterprise on-premise. We are using User Profiles as the data source. I have created a page in the My Sites and dropped in the Org Chart webpart and it shows correctly for the logged in user (root id is kept as blank). I can see my org chart fine.
But the problem is, when I go to another person’s profile and click on the org chart I still see mine instead of seeing his org chart?
What we want is, every one is able to see every one else’s org chart. I visit the profile page of my colleague I want to see his org chart and not mine.
Can you help me out on this? We have the accountname=domain\user in the querystring in all the pages, may be we can dynamically set the root id from this?
Thank you, that worked. I need one more feature, when I am showing the Org Chart I see My Manager, and Myself. I need to see 3 levels here, My Manager, My Self, My Subordinates. I am using the following code as of now:
[code]var currentUserLogin = GetUrlKeyValue(“accountname”);
var isInitialLoad = true;
renderer.prerenderAction = function(completed) {
try {
var context = SP.ClientContext.get_current();
var web = context.get_web();
var user = web.get_currentUser();
context.load(user);