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.
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.
Populate the key values for the object type, select the name of the event, and then click the Open button.
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.
Now you can navigate to the component to invoke the modified PeopleCode event to see the 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.
Leave a comment
Your email address will not be published. Required fields are marked *