Using the PeopleCode and Other Programming Language Editors
This section provides an overview of PeopleCode and discusses how to use the various programming language editors.
PeopleCode is the structured programming language built into PeopleTools that extends the functionality of the PeopleTools environment. All PeopleCode programs are associated with a parent definition. PeopleCode programs are considered part of the definitions of their parent components, and you edit them as part of the definitions.
You can associate PeopleCode programs with many items, such as record fields, pages, components, and application messages. You can access any PeopleCode program from its related definition. For example, one of the ways you can access PeopleCode from one of the many places that PeopleCode is stored is to access Record Field PeopleCode from an open record definition.
Image: Example of accessing FieldChange PeopleCode from the QE_BEGIN_DT field
This example illustrates the fields and controls on the Example of accessing FieldChange PeopleCode from the QE_BEGIN_DT field. You can find definitions for the fields and controls later on this page.
To view Record Field PeopleCode from PeopleSoft Application Designer, complete these steps:
Open a record definition in PeopleSoft Application Designer.
Click the View PeopleCode toolbar button to view the PeopleCode display for the record.
Select a field containing PeopleCode in the record definition.
Double-click the cell under the column heading for the type of PeopleCode that you want to view.
You can also right-click a definition and use the pop-up menu to access or view the PeopleCode.
Note: PeopleCode exists on a variety of definitions, such as records, pages, and components. You access PeopleCode through the definition on which it is written.
This section discusses these programming editors:
Application packages editor
Free form style sheet editor
The PeopleCode editor is a text editor that enables you to construct, modify, and review PeopleCode programs and associate them to PeopleSoft definitions and events. The PeopleCode editor enables you to edit and navigate all PeopleCode programs that belong to the same parent definition.
The user interface of the PeopleCode editor consists of two drop-down lists boxes and an area where you enter text. The drop-down list box that is on the left side of the editor is a displays the current field and other available fields, records, and components. Any field with PeopleCode attached appears in bold. The drop-down list box that is on the right side of the editor displays the current PeopleCode event and other events that are appropriate for that definition. Events already containing PeopleCode for that definition appear in bold. Beneath the drop-down list boxes is where you enter your text. In this area, you can add, delete, and change text and you can use the find and replace function. The PeopleCode editor validates the syntax of your code and the editor automatically formats the code according to PeopleSoft standards when you save the definition.
This example shows the PeopleCode editor:
Image: Example of working in the PeopleCode editor
This example illustrates the fields and controls on the Example of working in the PeopleCode editor. You can find definitions for the fields and controls later on this page.
Note: Multiple programmers may save changes to different PeopleCode programs associated with the same definition. However, the system displays an error if multiple programmers attempt to save the same PeopleCode program associated with the same definition and PeopleCode event.
The SQL editor is a text editor that enables you to construct, modify, and review a SQL statement and save it as a reusable SQL definition. Using the SQL editor, you can add, delete, and change text and you can use the find and replace function. The SQL editor formats the text, but the editor does not validate the SQL syntax.
You can access the SQL editor from these definitions:
Record definitions that are based on SQL and dynamic views.
PeopleSoft Application Engine actions.
Application Packages Editor
From an Application Package you can access the PeopleCode programs that are associated with the classes of the package. The Application Packages editor and the PeopleCode editor interfaces are similar. You can add, delete, and change text; you can use the find and replace function; and you can validate the syntax. When you save your application package, the code is automatically formatted, just as it is in the PeopleCode editor.
Free Form Style Sheet Editor
The free form style sheet editor interface enables you to create text-based sub style sheets that enable you to take advantage of Cascading Style Sheets - Level 2 (CSS2), AJAX, and DHTML. In the free form style sheet editor you can add, delete, and change text; and you can use the find and replace function. The editor does not format the text or validate the syntax.