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.

7 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!

  2. Rama says:

    Great project. When I tried to save the PeopleCode, i am getting an error – Unsupported use of %Metadata:PeopleCodeProgram:UpdateProgram (0,0)

        • Colton Fischer says:

          Thanks for the details. Unfortunately I have not had the chance to play with this utility on PeopleTools 8.53. I have only used it on 8.55 and 8.56. It is likely that your Tools version is what is causing the error. Hopefully someone else will chime in with their experiences of using this utility on older Tools to confirm this.

          In the meantime I would suggest exploring if there are any delivered usages of %Metadata:PeopleCodeProgram in your 8.53 environment. You can go to App Designer > Edit > Find In…, paste in “%Metadata:PeopleCodeProgram” in the “Find What” field, select “Entire Database” for the “Project” field, and click the Find button. This will show you if the delivered code makes use of the PeopleCodeProgram sub package. If you happen to find references, then look and see if they ever call the “UpdateProgram” method. This will tell you the proper usage of the method for the Tools that your environment is on. It is possible that it is something simple like the method taking fewer parameters in the older Tools than in the Tools that I created this utility in.

          Please let me know if you have any other questions and if you are able to get this to work.

  3. Rama says:


    I queried PSPCMTXT table and found out one reference for %Metadata:PeopleCodeProgram and it looks like the syntax is correct. Thanks for the suggestion. I will keep working on this and let you know if I am able to make it work. Thanks!

Leave a Reply

Your email address will not be published.