PeopleSoft Bookmarklets
A few years ago I read about using Javascript to create "bookmarklets". These are browser bookmarks that, unlike normal bookmarks, do not point to a specific URL. They instead contain Javascript and run that script when selected. This allows you to do a number of interesting things, but one idea I really liked was using them to create universal bookmarks, or cross-environment bookmarks, for PeopleSoft.
Basically, once you are logged into a PeopleSoft environment you can use a bookmarklet to transfer you to a specific page within that environment. This means I can have a single bookmarklet that takes me to a particular page of whatever environment I am in. So for example, I have one bookmarklet called "Process Monitor". If I am in FSCM and click that I am taken to Process Monitor for that environment, but if I am in HCM it takes me to that Process Monitor.
How Do They Work?
As I mentioned, a bookmarklet is just Javascript that does something. Below is the code for my "Process Monitor" bookmarklet. If you are familiar with Javascript it should be fairly straightforward. If not then I try to explain a little.
First, it creates the Regular Expression object that will be used to parse the current URL.
Then it builds the new URL using the replace function and the regular expression substituting in the new component and leaving off the old.
The same code should work for most components, just substitute the appropriate menu and component names.
Another bookmarklet...
I use this one to switch to the same PeopleSoft component in a different site, assuming that single signon is enabled for the two sites you are switching between and your ID exists in both with the appropriate security. This is helpful when comparing settings between two different environments, and saves a couple logins.
This bookmarklet makes a few more changes, as well as prompting for some values, but the idea is the same. Although in this case I am replacing hostname, sitename and nodename instead of component name. I include the prompts so one bookmarklet can be used to take me anywhere I want, as long as I remember the correct values, but you could also build one for each environment.
Why Use Them?
Navigating the PeopleSoft menu can be a bit tedious, but after some time you learn to find things pretty quickly. Still, I often find myself switching between multiple PeopleSoft environments and navigating to the same pages.
Browser bookmarks, of course, can be created, but I would need to create a separate collection for each environment of each application. There might be a Financials Test, Financials Dev, HCM Test, HCM Dev, etc. Then every relevant bookmark for each application. That would be way too much to efficiently maintain.
PeopleSoft application Favorites help a bit more. These are stored in the application and tied to your user profile. They can be created once in production then copied down into each environment through scripting or database refreshes. There is, however, still the requirement to create each favorite in each application. If you spend a lot of time in PeopleTools components like security, portal administration, Integration Broker, etc. then you are still creating the same favorites multiple times. I also find that my application favorites may not be the same in all environments, depending on when the environment was last refreshed, and may not reflect my most recent areas of focus.
My Collection
Below are some of the bookmarklets I have created. You can copy the code to create your own, or just drag the links to your bookmark bar or favorites folder.
Switch PeopleSoft Site
Switch PeopleSoft Application
IB Asynchronous Services Monitor
Portal Structure and Content
Process Monitor
Report Manager
Trace PeopleCode
Trace SQL
User Profile
I originally came across this idea elsewhere online, but wanted to share. These bookmarklets work pretty well for me so I hope someone else finds them useful. Plus this is a great way to get started, then maybe build other bookmarklets for other sites!
Enjoy!
Basically, once you are logged into a PeopleSoft environment you can use a bookmarklet to transfer you to a specific page within that environment. This means I can have a single bookmarklet that takes me to a particular page of whatever environment I am in. So for example, I have one bookmarklet called "Process Monitor". If I am in FSCM and click that I am taken to Process Monitor for that environment, but if I am in HCM it takes me to that Process Monitor.
How Do They Work?
As I mentioned, a bookmarklet is just Javascript that does something. Below is the code for my "Process Monitor" bookmarklet. If you are familiar with Javascript it should be fairly straightforward. If not then I try to explain a little.
// Process Monitor javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/PROCESSMONITOR.PROCESSMONITOR.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
First, it creates the Regular Expression object that will be used to parse the current URL.
- (\/ps.) represents the servlet of the PeopleSoft URL
- (/\\w+) represents the site name
- (/EMPLOYEE) represents the portal name, mine are usually the same
- (/\\w+) represents the node name
- (/.*) represents everything else - which is what I will throw away
Then it builds the new URL using the replace function and the regular expression substituting in the new component and leaving off the old.
- /psp + /sitename + /portalname + /nodename + /c/menu.component.GBL
Another bookmarklet...
I use this one to switch to the same PeopleSoft component in a different site, assuming that single signon is enabled for the two sites you are switching between and your ID exists in both with the appropriate security. This is helpful when comparing settings between two different environments, and saves a couple logins.
// Switch PeopleSoft Application - includes prompt for HOSTNAME, SITENAME and NODE javascript:(function(){ var hostname = prompt('Hostname? (i.e. pswebxxx.domain.org)'); var sitename = prompt('Sitename? (i.e. fstst,hrtst...)'); var node = prompt('Node? (i.e. ERP,HRMS,EMPL)'); var objRegExp1 = new RegExp(/(\/\/)(.*\..*\..*)(\/ps.\/)(\w+)(\/\w+\/)(\w+)(\/.*)/); var u1 = location.href.replace(objRegExp1, "$1" + hostname + "$3" + sitename + "$5" + node +"$7"); location=u1; })()
This bookmarklet makes a few more changes, as well as prompting for some values, but the idea is the same. Although in this case I am replacing hostname, sitename and nodename instead of component name. I include the prompts so one bookmarklet can be used to take me anywhere I want, as long as I remember the correct values, but you could also build one for each environment.
Navigating the PeopleSoft menu can be a bit tedious, but after some time you learn to find things pretty quickly. Still, I often find myself switching between multiple PeopleSoft environments and navigating to the same pages.
Browser bookmarks, of course, can be created, but I would need to create a separate collection for each environment of each application. There might be a Financials Test, Financials Dev, HCM Test, HCM Dev, etc. Then every relevant bookmark for each application. That would be way too much to efficiently maintain.
PeopleSoft application Favorites help a bit more. These are stored in the application and tied to your user profile. They can be created once in production then copied down into each environment through scripting or database refreshes. There is, however, still the requirement to create each favorite in each application. If you spend a lot of time in PeopleTools components like security, portal administration, Integration Broker, etc. then you are still creating the same favorites multiple times. I also find that my application favorites may not be the same in all environments, depending on when the environment was last refreshed, and may not reflect my most recent areas of focus.
My Collection
Below are some of the bookmarklets I have created. You can copy the code to create your own, or just drag the links to your bookmark bar or favorites folder.
Switch PeopleSoft Site
javascript:(function(){var hostname = prompt('Hostname? (i.e. pswebxxx.domain.org)');var sitename = prompt('Sitename? (i.e. fstst,hrtst...)');var objRegExp1 = new RegExp(/(\/\/)(.*\..*\..*)(\/ps.\/)(\w+)(\/.*)/);var u1 = location.href.replace(objRegExp1, "$1" + hostname + "$3" + sitename + "$5");location=u1;})()
Switch PeopleSoft Application
javascript:(function(){var hostname = prompt('Hostname? (i.e. pswebxxx.domain.org)');var sitename = prompt('Sitename? (i.e. fstst,hrtst...)');var node = prompt('Node? (i.e. ERP,HRMS,EMPL)');var objRegExp1 = new RegExp(/(\/\/)(.*\..*\..*)(\/ps.\/)(\w+)(\/\w+\/)(\w+)(\/.*)/);var u1 = location.href.replace(objRegExp1, "$1" + hostname + "$3" + sitename + "$5" + node +"$7");location=u1;})()
IB Asynchronous Services Monitor
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/IB_PROFILE.IB_MONITOR.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
Portal Structure and Content
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/PORTAL_ADMIN.PORTAL_OBJ_LIST.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
Process Monitor
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/PROCESSMONITOR.PROCESSMONITOR.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
Report Manager
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/REPORT_MANAGER.CONTENT_LIST.GBL?Page=CDM_CONTLIST"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
Trace PeopleCode
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/UTILITIES.PEOPLECODE_TRACE.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
Trace SQL
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/UTILITIES.TRACE_SQL.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
User Profile
javascript:(function(){ var objRegExp = new RegExp("(\/ps.)(/\\w+)(/EMPLOYEE)(/\\w+)(/.*)"); var t = "/c/MAINTAIN_SECURITY.USERMAINT.GBL"; var u = location.href.replace(objRegExp, "/psp" + "$2" + "$3" + "$4" + t); location=u; })()
I originally came across this idea elsewhere online, but wanted to share. These bookmarklets work pretty well for me so I hope someone else finds them useful. Plus this is a great way to get started, then maybe build other bookmarklets for other sites!
Enjoy!
Comments
Post a Comment