In 2011, just after PeopleTools 8.50 released, I wrote the post Changing the Search Page Operator. In that post, I demonstrated how to Monkey Patch PeopleSoft to do something you can't do with core PeopleTools: change the default advanced search page operator from Begins With to Between. A lot has changed since I wrote that initial post:
- PeopleSoft switched from net.ContentLoader to net2.ContentLoader,
- The default user experience switched from Classic to Fluid.
Let's create a new version. Before writing any code, let's discuss that last bullet point. This post will focus on Classic. Why? Two reasons:
- Fluid doesn't use traditional search pages built from search record metadata and
- Roughly 95% of the components in PeopleSoft are still Classic.
JSM_REQUIRE_JS. For compatibility reasons, we should also protect our version of jQuery from any other versions of jQuery that may be loaded by PeopleTools. To do this, we create a library named
JSM_PRIVATE_JQ_JS that contains the following code:
Next we need a RequireJS configuration that tells RequireJS how to locate each library we intend to use. I named mine
JSM_REQUIREJS_CONFIG_JS, but this name is less important because we will select it from a prompt when configuring Branding System Options. Here is our RequireJS configuration:
Note: I snuck an extra library into the RequireJS configuration. Can you figure out what it is? I will be demonstrating this extra library at my session for OpenWorld 2019. Don't worry about removing it, however. As long as we don't reference it, RequireJS will never attempt to load it.
fieldMap variable contains the mapping between component names and fields that should be changed.