Scope of the Tree Objects
All tree objects, that is, trees, tree structures, nodes, leaves, and so on, can only be instantiated from PeopleCode.
This object can be used anywhere you have PeopleCode, that is, in an application class, Application Engine PeopleCode, record field PeopleCode, and so on.
You can instantiate a tree or tree structure object only from a session object. You have to instantiate the session object, and connect to the database, before you can instantiate a tree or tree structure.
Local ApiObject &TREELIST; Local ApiObject &MYSESSION; &MYSESSION = %Session; If &MYSESSION Then /* connection is good */ Else /* do error processing */ End-if;
Note: Tree Classes are accessible only through PeopleCode.