Step 2: Embed the Hierarchy Explorer widget


The Hierarchy Explorer widget can be embedded into the following applications:

  • Network Portal - To add the widget to an application for the Network Portal, see the Network Portal topics.

  • Internal application - Saving the widget generates the code that you can use to embed the Hierarchy Explorer widget in your internal application.

    Note: Generate the code any time you make changes to the widget configuration.

    See the Network Widgets topics in the Veeva Network API Reference. Use the "Affiliation widget" topic as a guide.

  • Veeva CRM Online - The widget can be used in your Veeva CRM Online application.

Embedding the widget in internal applications

After administrators save the Hierarchy Explorer widget configuration, Network generates the code snippets that are required for your web-based internal application. Click Generate Code to copy the code so you can provide it to your web developer.

The process for embedding the widget is similar to the Search Widget and Profile Widget. There are no events that need to be defined for the Hierarchy Explorer widget.

For more information, review the Network Widgets documentation in the Veeva Network Developer Online Help:

Integrating widgets without single sign-on

To allow your users to test the widget without using single sign-on, the widget can be configured to use demo mode. For details about the configuration, see

Demo mode is available in Sandbox instances only.

To enable demo mode for the widget, contact Veeva Support.

Embed the widget in Veeva CRM Online

The Hierarchy Explorer widget can be used in your Veeva CRM Online application.

To add the widget to Veeva CRM, see Embed the widget in Veeva CRM Online in the Veeva Network API Reference.

Note: If you are embedding the widget into Salesforce Lightning, add the following property to the generated widget code: application-type="SALESFORCE_LIGHTNING".

Embedding the Hierarchy Explorer Widget in Salesforce Lightning

This visualforce page can be used to embed the widget into Salesforce Lightning.

To embed the widget:

  1. Create a Visualforce page.

    For instructions, see the Salesforceâ„¢ documentation:

    These Visualforce pages for Salesforce Lightning or Salesforce Classic can be used as a template.


    • The page references Sandbox scripts. To point to the Production scripts, remove "sandbox".
    • Update the widget snippet with your own generated code.

    Sample page for Salesforce Lightning

    <apex:page >
       <!-- Include the script to load widget -->
       <script type="text/javascript" src=""></script>
       <script type="text/javascript" src=""></script>
          html, body {
          width: 100%;
          height: 100%;
          padding-left: 0px;
          #widgetContainer {
          width: 100%;
          height: 100%;
          #widgetEl {
          width: 100%;
          height: 100%;
          margin-top: -10px;
          margin-left: -20px;
          <div id="widgetContainer">
  2. Create a Visualforce tab.

    Follow the steps in the Salesforce documentation:

Enable full screen mode

To support full screen mode in Salesforce Lightning, Web developers can add a property to the generated Hierarchy Explorer widget code that is embedded in your internal application.



Example code

Add the property to the end of the generated code.