Tag Archives: PeopleCode

Application Engine’s exit function

In PeopleSoft Application Engine, we have a command called “exit”. That’s used to help program determine what return value that particular step returns, and that value can then be used to determine the flow.

Here I have a sample AE:


Note the PeopleCode in Step01 is set up as “On Return Skip Step”. That’s telling you that if that PeopleCode program returns a non-0 (true) value, the program should skip this step (Step01), which is the Log Message. It should however continue to run Step02 as it’s an independent one.

Here is the code in detail:

For Step01’s PeopleCode, I have:


Step02 has this:



Going back to Step01’s PeopleCode, first, the if statement will always be false, so it will run the else part, which will return 1. The program see it’s a non-0 (true) value, so it will do what the On Return says, to Skip Step. So our Log Message part will not run, but Step02 will run.


Here is a log from the AE:


As we expected, the Log Message is not here, but Step02 is run.

Let’s change the code:


Now the if statement is true, so 0 will be returned. Let’s see what the log is after the run:


As you can see the Log Message is printing out information, and Step02 is run too.

PeopleSoft Component Build

This is a quick run-through of the events fired when user accesses a component.

  1. SearchInit
  2. Now you enter the search criteria
  3. SearchSave
  4. System does the search and displays the search result.
  5. User picks the target (this is skipped if there is only one result)
  6. System queries the database.
  7. RowSelect (this runs once for each row)
  8. PreBuild
  9. RowInit (This runs once for each row)
  10. PostBuild
  11. PageAcitvate

MsgGet, MsgGetText, and MsgGetExplainText

PeopleSoft provides message catalogs for user to manage text messages dynamically.

Message Catalog

In addition to the MessageBox built-in method, there are three built-in methods that we can use to retrieve text from message catalog table.

  • MsgGet: This will return the text in Message Text field. It will append the message set number and message number at the end of the text. In our example above, it would return
    Number field format error. The field format is %1. The currency control field %2 restricts it too. (15,48)
  • MsgGetText: This will return the same thing as MsgGet does, but without the message set number and message number
    Number field format error. The field format is %1. The currency control field %2 restricts it too.
  • MsgGetExplainText: This method will return the text in description field
    The value of the currency control field should be the name of a currency entry in the PS_CURRENCY_CD_TBL, which defines a currency symbol, thousands delimiter character, decimal character, integer positions, decimal positions, and scale positions. The value for this field is constrained by the more restrictive of that format and the field’s format.

Hope this helps you a bit. :)

Find literal strings in PeopleSoft

User comes to you for an PeopleSoft issue, she has a screen shot, which is great. That’ll help a lot on debugging. Here is what I would do to find out where that error message is fired from in the PeopleCode.

First if the error message is from message catalog, there is no need for anything. You just use the message set number and message number and do a search in the code to find out where it’s fired. Usually the places where we would normally have issues are from customized code, so what I did is to do a search for all the customized message set number and save that in a text file. That would save a lot of time if you see a message from the same message set number again.

There are chances that the message is from message catalog, but it does not show you the message set number or message number. That’s when you need to query the PSMSGCATDEFN table to see if the message if from that table or not.

If you can’t find it there, you want to try this table PS_HR_SSTEXT_TEXT. That table is for Text Catalog, which is located in Main Menu –> Set Up HRMS –> Common Definitions –> Text Catalog and Notepad.

Next suspect, if you can’t find it in the table above, is to look at the Notification Templates. (That’s located in PeopleTools –> Workflow –> Notifications). Usually there aren’t too many templates involved, so I would just go online and find if it’s there. You can of course query the database for it. (I don’t have the table name for this one).

If all fail, you would end up do a search in Application Designer, which may take some time if the index is not readily available for you.