get_peoplecode
Retrieve PeopleCode source code attached to PeopleSoft records and fields to analyze component logic, field behavior, and customizations.
Instructions
Get PeopleCode programs attached to a record/field, including the actual source code.
Reads from PSPCMTXT which stores the PeopleCode source as CLOB. Use this to
understand component logic, trace field behavior, or analyze customizations.
Args:
record_name: The record name (e.g., 'JOB', 'ABSV_REQUEST')
field_name: Optional field name to filter (e.g., 'EMPLID', 'EFFDT')
event: Optional event type filter. Common events:
- RowInit: Fires when row is loaded
- FieldChange: Fires when field value changes
- FieldEdit: Validates field before accepting
- SaveEdit: Validates before save
- SavePreChange: Runs before database update
- SavePostChange: Runs after database update
- RowDelete: Fires when row is deleted
- RowInsert: Fires when new row inserted
- SearchInit: Fires on search page load
- SearchSave: Fires when search is executed
include_code: If True (default), returns actual PeopleCode source.
Set to False for just metadata/listing.
max_code_length: Maximum characters of code to return per program (default 32000).
Use for large programs that may exceed response limits.
Returns:
List of PeopleCode programs with their events and source code.
Programs are ordered by field name and event for logical reading.
Example:
# Get all PeopleCode for ABSV_REQUEST record
get_peoplecode("ABSV_REQUEST")
# Get just FieldChange events for BEGIN_DT field
get_peoplecode("ABSV_REQUEST", "BEGIN_DT", "FieldChange")
# List all events without code (for discovery)
get_peoplecode("JOB", include_code=False)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | No | ||
| field_name | No | ||
| record_name | Yes | ||
| include_code | No | ||
| max_code_length | No |