
We've been spending a lot of time on drilling features in our products. The nVision Drilling Snap-onis all about drilling, and we're working on a new product that will add drilling all over the online PeopleSoft pages. So we're constantly needing to dig up a complete URL to a PeopleSoft page (including the keys).
Like a lot of early web applications PeopleSoft 8 didn't do a very good job in letting you know what URL you needed to supply to get a user directly to a specific page. In between frames and a heavy reliance on using POST (which is a topic for some other day) it was pretty tricky to figure out.
So when PeopleSoft 8.4 came out in 2002 one of the things that was added automatically to the top right corner of each page was a link that would copy the URL for the current page to the clipboard.

You can see the same sort of thing done now on sites like Google Maps where they provide a "link to this page" link in top right corner of each page. Sof if you drag the map around or zoom in/out, you can get the direct URL to where you are I'm sure that there are other examples as well.
One minor problem with the way that the PeopleSoft link works is that it pulls in not just the keys needed to identify a single row in the component search, but it also pulls in alternate search keys as well.
For example, if you pull up VP1 on the User Profiles component and click on that link, then paste the URL from the clipboard somewhere where you can look at it, you'll see that the generated URL includes the DESCR field in it, along with OPRID. If the description of this user account ever changes (like someone getting married and changing their name), then the URL doesn't work anymore. Which is a real headache if you've mailed that URL to a bunch of people.
That's easy enough to work around by changing the generated URL before you do something like emailing it (pain that is), but if you're using Firefox and just tried to click that link and then paste the URL somewhere, you probably noticed that it didn't work.
The reason is that Internet Explorer allows JavaScript to access the clipboard by default and Firefox does not.
To turn on access temporarily in Firefox enter the URL about:config and hit Enter. This will bring up a huge list of settings. The one we want is called signed.applets.codebase_principal_support. Thankfully the settings dialog does type ahead searching so you only have to type a few characters to get to it. Once you find it, double click the entry to change it from it's default setting of False to True.
Now when you go back to the PeopleSoft page and try it again you'll find it works. Actually it prompts you about the current site trying to access the clipboard and ask you to grant access, which you'll want to allow. Security is always a good thing, even if it means an extra step in the process.
If you want to make this setting last between restarts of Firefox, then you'll need to update the Firefox prefs.js file, which stores your Firefox settings. This file lives in your Firefox profile directory.
An alternative to getting the full URL is to enable Notification support for the component. I'll write more about what Notifications (aka Ad-hoc Workflow) are in a future post. For now, the easiest way for you to test this out is to go to PeopleTools -> Workflow -> Notifications -> Generic Templates and pull up the system default template. You'll notice a Notify button down near the Save button. If you click this and take a look at the generated email, you'll see that the direct link to the component (with the proper key structure) is correctly generated.
The big drawback to this approach is that Notifications were not defaulted on in the 8.4 upgrade, so you have to update each component definition where you want this turned on (Component properties, Internet tab).
Labels: PeopleSoft


javascript:(function(){prompt("Copy URL", top.frames[2].strCurrUrl)})()
For a content page:
javascript:(function(){prompt("Copy URL", strCurrUrl)})()