Online PeopleCode Editor Project

I recently made a post discussing the %metadata application package in PeopleSoft.  I provided an overview of the package as well as examples of how to use it.  To support my research efforts in understanding this package, I made a simple web-based PeopleCode editor to edit PeopelCode events in the PIA.  My initial plan was to try build out a web IDE for accessing and modifying PeopleTools objects.  I have found myself busy working on other projects and wanted to at least share what I was able to create.  This project is simply an IScript that serves a basic interface to view and modify PeopleCode events using the %metadata application package.  In this post, I will walk through how to install and use this online PeopleCode editor project.  Please note that this project is a proof of concept and it is not intended to be used in any production PeopleSoft environments.

CLICK HERE to download the Online PeopleCode Editor project.  Unzip the file and copy the project from file into App Designer.

The only setup that is needed to get this project working is the assignment of a Permission List. Login to the PIA and assign the PSM_WIDE Permission List to a role that you want to have access to the PeopleCode editor.

Assign Permission List

Using the user account with the appropriate role, navigate to Main Menu > PSM Projects > Web IDE.  Select the object type of PeopleCode program that you want to open.

Select Object Type

Populate the key values for the object type, select the name of the event, and then click the Open button.

Select Event Name

If you provided key values to a valid PeopleCode program, then you should get presented with a garbled mess of an entire PeopleCode event represented as a raw string.  In this example, I have opened the PeopleCode on the Post Build event of User Profiles component.  At this point you can modify the code and click the Save button to save the changes.  If there are any syntax errors, then the IScript should respond with an error message.  However, the IScript is not coded to have robust error handling.

In this example, I added a simple message box to the end of the code and clicked the Save button.

Edit PeopleCode

Now you can navigate to the component to invoke the modified PeopleCode event to see the changes.

Test Changes

While this tool is really raw and cosmetically unappealing, I believe it does a decent job of demonstrating how the %metadata application package can be used to programmatically modify PeopleCode events.  I think this tool can be enhanced on many different fronts and would be interested in hearing if anyone is able to make this tool more usable.

2 thoughts on “Online PeopleCode Editor Project

  1. Jonathan R says:

    Really interesting project, Colton. I wonder if using a contenteditable ( element would make it easier to format the code nicely, e.g. insert whitespace and newlines in the correct place. No promises, but I may play with that sometime and see if I can get the Sublime Text PeopleTools syntax highlighter ( to work in the browser.

    • Colton Fischer says:

      It is possible that the contenteditable element could be of use. The code formatting is probably going to be the trickiest piece for this project. Please keep us updated if you make any progress!

Leave a Reply

Your email address will not be published.