Using SmartNavigation for Trees

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes)

SmartNavigation with Trees

SmartNavigation with Trees

SmartNavigation Pages

SmartNavigation Pages

I discovered this option while we were performing PeopleSoft upgrade to version 9.1. This particular feature allows to browse tree-like structures within PeopleSoft using SmartNavigation Pages, or Breadcrumb-like in addition to the standard Tree pages. It is quite simple to enable if you have a tree. In my opinion it makes browsing more visual, and allows to include Action buttons on the details, e.g. in case you wanted to transfer an employee, or close the department etc.

Here is a quick example of how you can enable SmartNavigation for Department Tree.

  1. Create a content reference in the folder that you would like
  2. Fill in the Tree information similar to the screenshot below
  3. Note: Display as Content Refernce checkbox will disable Breadcrumbs navigation, leaving only Chart Navigation page
Tree browsing using SmartNavigation Page

Tree browsing using SmartNavigation Page

In case you would want to create a tree dynamically within PeopleCode you can also follow this article in PeopleBooks and learn how to create a new tree, here is a sample PeopleCode from this book:

Local ApiObject &Session; 
Local ApiObject &TreeList, &MyTree; 
Local ApiObject &LvlColl; 
&Session = %Session; 
&MyTree = &Session.GetTree();
   /* create new tree */ 

If All(&MyTree) Then 
  &TreeReturn = &MyTree.Create("", "", "PERSONAL_DATA2", "1999-06-01", "PERSONAL_DATA"); 
   If &TreeReturn <> 0 then
      /* check PSMessages collection */

   &MyTree.description = "test tree"; 
   /* add level */ 
   &LvlColl = &MyTree.levels; 
   &Level = &LvlColl.add("FIRST LVL"); 
   &Level.description = "First Level"; 
   /* add root node */ 
   &RootNode= &MyTree.insertroot("00001");
If ALL(&RootNode) Then 
 /* insert a leaf */
       &NewLeaf = &RootNode.InsertChildLeaf("8000", "8999"); 
   /* save new tree */ 
   &RSLT = &MyTree.Save(); 
   /* Do error checking */ 
   If &RSLT <> 0 Then 
      /* errors occurred = do error checking */ 
      &ERRORCOL = &Session.PSMessages; 
      For &I = 1 To &ERRORCOL.count 
         /* do error processing */ 
      /* no errors - saved correctly - do other processing */ 


I really want to know what you think