Data Type and Scope of the Document Classes

Every document class is its own data type—that is, documents are declared as the Document data type, primitive objects are declared as the Primitive type, and so on. For example:

Local Document &Doc;

The following are the data types of the document classes:

  • Document

  • DocumentKey

  • Primitive

  • Compound

  • Collection

Document objects can only be instantiated from PeopleCode. These objects can be used anywhere you have PeopleCode—that is, in Component Interface PeopleCode, record field PeopleCode, Application Engine PeopleCode, and so on.