Generating PeopleCode Templates to Access Component Interfaces

To access a component interface using PeopleCode, PeopleSoft Application Designer generates a template in the form of boilerplate PeopleCode that you can adapt to your purposes. This section describes how to generate the template code.

This example illustrates PeopleCode generated by dragging and dropping a component interface.

PeopleSoft Application Designer

To generate a PeopleCode template for a component interface:

  1. Open the desired component interface definition in PeopleSoft Application Designer.

  2. Insert the component interface into a project.

    1. Select Insert > Current Object into Project.

    2. Save the project.

  3. Open the PeopleCode editor.

    You can associate component interface PeopleCode with a record, a component, a service operation handler, or an Application Engine program.

  4. Select the component interface from the project workspace.

    Drag and drop the object from the project into the PeopleCode Editor.

  5. Make any necessary changes to the PeopleCode in the PeopleCode Editor window.

    This is especially important on components that have multiple scrolls at the same level, as the automatic code generation may have difficulty determining the parent of the collection (scroll). Therefore, the template code should be inspected and corrected as needed.