Getting started
Configuration wizard
HTML templates
JavaScript framework
Additional resources
- Video: Introducing Plumsail Org Chart
- Data caching
- SharePoint Server 2019/SE (On-Premises) resources
- Installation for SharePoint 2019 / SE
- Quick configuration
- How to add Org Chart to Microsoft Teams tabs
- Generate organization structure report
- Layout
- Filtration
- JavaScript custom code
- General settings
- Display assistants
- Display dotted-line managers for Org Chart
- Display vacancies
- Customize box HTML template and CSS styles
- HTML templating syntax
- Change Org Chart skin
- Create org chart with two root managers
- Order employees boxes using custom field
- How Org Chart pulls data from AD On-Premises
- Drill down to current user by default
- Drill down to specific box using URL parameter
- Include and use fields from additional list
- Use advanced Org Chart navigation
- How to open Org Chart in full-screen mode on load
- Support of search in a list with more than 5000 items
- Exclude disabled users in On-Premises
- Configuring profiles sync in On-Premises
- Make sure that SharePoint has enough data
- Exporting properties to a directory service
General
- Version history
- Licensing details
- Data protection and security
- Custom code security measures
- Billing and subscription management
Printing & Reports
- Printing organizational structure
- Generate multi-page PDF report
- Export to CSV and analyze in Excel
- Custom styles for printed Org Chart
Microsoft Teams
Display different types of employees
Filter and order boxes
- Create and manage filtered views
- Order employees boxes using a custom field
- Group employees boxes using a custom field
Customize boxes and styles
- Format boxes conditionally
- Customize box HTML template and CSS styles
- Display awards and conditionally format Org Chart
- Create an Org Chart with two root managers
- Change Org Chart theme
- Localize Org Chart
Show specific user on load
- Drill down to specific box using URL parameter
- Drill down to current user by default
- Drill down to manager of user from URL by default
Manage web part size and scale
- Open Org Chart in full-screen mode on load
- Make Org Chart use full page width
- Automatically scale boxes to fit visible area
Other examples
- How to customize Org Chart
- How to use advanced Org Chart navigation
- Use tenant properties to disable Org Chart features
- Include and use fields from additional list in Org Chart
- Support of search in a list with more than 5000 items for Org Chart
- Show Org Chart based on a list data source for anonymous users
- How to check if a user has Tenant Administrator permissions
Drill down to specific box using URL parameter in Org Chart (SharePoint Server 2019/SE)
In this quick tip I will describe how to navigate to specific box in your org chart using URL parameter.
Drill down to specific box
It may be useful if you want to place link to specific box to other page. For example, you can use it to open org chart starting from manager of specific department. Some of our customers use this approach to add link to employees search results. Thus, you can navigate to person in org chart directly from search results.
In my case Org Chart web part is located here:
https://sharepoint.contoso.com/sites/hr/SitePages/orgchart.aspx
I want to be able to navigate to specific box using URL like this:
https://sharepoint.contoso.com/sites/hr/SitePages/orgchart.aspx?boxID=domain%5Cusername
Depending on your configuration, Org Chart uses a specific property as the box ID.
For User Profiles, this is usually a domain account name such as domainusername.
For a SharePoint list data source, it can be another field value, such as the list item ID.
Thus, boxID is the employee identifier used by your Org Chart data source.
Open the configuration wizard of Org Chart, navigate to Custom JavaScript step and paste this code into code editor:
var boxId = GetUrlKeyValue("boxID");
//if there is boxID in URL
if(boxId) {
//Skip initial rendering to speed up the process
renderer.config.renderInitialNode = false;
//Wait for web part loading
renderer.onInitialLoadingFinished(function(){
//Drill down to box from URL parameter
renderer.drillDown(boxId);
});
}
Finish the wizard. That is it! Now you can navigate to specific box in your organizational structure using URL parameter.
Drill down to manager of user
Instead, if you want to drill down to a manager of a user based on a URL parameter on Org Chart load, please follow the steps detailed below:
It will take accountname URL parameter and drill down to a manager of this user on Org Chart load.
If there no URL parameter it will drill down to a manager of a current user.
If there is no manager, it will drill down to this user.
This works in Org Chart for SharePoint Server 2019/SE.
In my case, Org Chart web part is located here:
https://sharepoint.contoso.com/sites/hr/SitePages/orgchart.aspx
I want to be able to drill down to a manager of a user using URL like this:
https://sharepoint.contoso.com/sites/hr/SitePages/orgchart.aspx?accountname=domain%5Cusername
Depending on your configuration, Org Chart uses a specific property as the box ID.
For User Profiles, this is usually a domain account name such as domainusername.
For a SharePoint list data source, it can be another field value, such as the list item ID.
Thus, accountname is the employee identifier used by your Org Chart data source.
Open the configuration wizard of Org Chart, navigate to Custom JavaScript step and paste this code into code editor:
var accountNameFromUrl = GetUrlKeyValue("accountname");
function drillDownToManagerOfUser(accountName) {
renderer.dataProvider.getBoxGroupItemDataById(accountName,
function (dataItem) {
if (dataItem.ParentId) {
console.log("Drilling down to manager: " + dataItem.ParentId);
renderer.drillDown(dataItem.ParentId);
} else {
console.log("Drilling down to user: " + accountName);
renderer.drillDown(accountName);
}
});
}
//Don't wait for loading of initial root employee
renderer.config.renderInitialNode = false;
//Wait for web part loading
renderer.onInitialLoadingFinished(function () {
//if there is accountNameFromUrl in URL
if (!accountNameFromUrl) {
//Drill down to current user's manager if exists
renderer.dataProvider.getCurrentUserAccountName(function (accountName) {
drillDownToManagerOfUser(accountName)
})
} else {
//Drill down to a manager of a user from URL if exists
drillDownToManagerOfUser(accountNameFromUrl)
}
});
Finish the wizard. That is it! Now you can navigate to manager of a user according to a URL parameter.
How it works
When your web part is loaded, custom JavaScript code is executed. This code disables initial rendering of web part to make drill down instead of waiting for web part loading:
renderer.config.renderInitialNode = false;
Then it checks if there is URL parameter accountname. If the URL parameter is not specified, it gets current user account name and tries to drill down to a manager of a current user. If there is no manager, it drills down to a current user:
//Drill down to current user's manager if exists
renderer.dataProvider.getCurrentUserAccountName(function (accountName) {
drillDownToManagerOfUser(accountName)
})
If the URL parameter is specified it tries to drill down to a manager of account name from the URL parameter:
//Drill down to a manager of a user from URL if exists
drillDownToManagerOfUser(accountNameFromUrl)
Drill down logic is implemented in drillDownToManagerOfUser JavaScript function:
function drillDownToManagerOfUser(accountName) {
renderer.dataProvider.getBoxGroupItemDataById(accountName,
function (dataItem) {
if (dataItem.ParentId) {
console.log("Drilling down to manager: " + dataItem.ParentId);
renderer.drillDown(dataItem.ParentId);
} else {
console.log("Drilling down to user: " + accountName);
renderer.drillDown(accountName);
}
});
}