Tips & Techniques


PeopleSoft officially supports a variety of enterprise databases, the most prominent of them are Oracle, DB2 and MSSQL. When PeopleSoft applications are delivered, one could readily assume they are tested intensively against these databases.

When developing PeopleTools customizations with SQL, do you think about whether the code being written will work for other databases as well? As a developer, the importance of this issue may not be apparent in your daily work. However, for your client or organization the long-term cost is vendor lock-in — making it more difficult and costly to switch database vendors when the need arises.

PeopleTools made it easy to code cross-platform SQL in your PeopleSoft applications, so there really is not much excuse for ignoring cross-platform compatibility issues further. There are 2 features in PeopleTools that are geared towards mitigating SQL cross-platform issues:

read more…

If you’re a PeopleSoft programmer, the Error() function is probably one of the first function you learned in PeopleCode. Raising an error — via the Error or MessageBox functions — is an indispensable operation, and serves multiple purposes throughout the component processor flow. Aside from displaying a message to the user, issuing an error has an accompanying effect which depends on which PeopleCode event it occurs. In FieldEdit, it highlights the affected field and stops further processing; in SaveEdit, it is used to abort save processing (SavePreChange–Workflow–SavePostChange); in RowDelete, it is used to cancel the user delete action.

read more…

When working with HTML areas or an IScript page, it is still often very convenient to store data into arrays. When converting the data into the necessary HTML, the Join() method of the Array class still provides a convenient way to formulate your HTML without doing a loop. The following examples should illustrate.

To generate a series of paragraphs from an array &arPara:


   &html = &arPara.Join("</p><p>", "<p>", "</p>");

To create an unordered (bullet) list from &arList:


   &html = &arList.Join("</li><li>", "<ul><li>", "</li></ul>");

Previously, I’ve presented a technique on how to effectively append javascript execution in your PeopleSoft pages. The technique could be used to append a stylesheet to a PS page; or run code to beautify the page, perhaps adding fancy functionality like drag-and-drop to the elements. Javascript execution using the technique, however, is static. It applies to those scenarios where you want the custom javascript to run at every page load.

read more…

Yet another thing I learned this week. It is possible to open a component directly, bypassing the search page — of course after logging in — from a URL link. In the URL, just add the search key field values in the query string. You’ll have to specify the exact search key fieldname and value pairs: ?EMPLID=AA01234&EFFSEQ=1

This could be useful when sending notifications to users via email, and you want to provide a link directly to the specific page and data.

To call a synchronous App Engine process via PeopleCode, use the CallAppEngine() builtin function. Any run parameters for the App Engine can be passed through a record specified in the function parameters. The record field values are loaded to the App Engine program’s state record(s) when it runs.

If attempting to initiate an App Engine process asynchronously, the only way to do so is through the ProcessRequest class — the PeopleCode API for the Process Scheduler. Unlike CallAppEngine(), there is no straightforward way to pass parameters to the scheduled process. Following are 2 methods for passing parameters to an App Engine process.

read more…

Of the basic PeopleTools tables, the USEEDIT field of the record field properties (PSRECFIELD) is perhaps the most intruiging. The USEEDIT field is a 32-bit integer field. For some reason (is it for maximizing space? is it forward-thinking? to eliminate the need to add fields on future attributes?), PeopleSoft crammed a bunch of field properties into this single field. PeopleSoft did this by assigning a property to each bit of the field value.

For example: if the value of USEEDIT is 257, its binary representation is 0000000100000001. As you can see, the rightmost 1st bit and the 9th bit are turned on. The 1st bit represents the Key attribute, whereas the 9th bit represents the Required attribute. This means that a USEEDIT value of 257 represents a field which is both a Key and is Required.

read more…

« Previous PageNext Page »