I use URL's quite extensively for Ajax and other non-Integration Broker integrations (NEVER HARD CODE URL'S!). PeopleTools provides a couple of ways to store URL information. The most well-known of these features is the URL definition (PeopleTools > Utilities > Administration > URLs). URL Definitions are great for relative URL's, but I'm not fond of storing fully qualified URL's in this manner. Here is why...
Imagine having 5 URL's that point to different resources on the same server and then one day the server's host name changes. Because of this change I have to modify 5 URL definitions. What if I forget one?
An alternative is to store the base URL in a node definition and then the relative portion of the URL in a URL definition. Creating a fully qualified URL in this manner requires concatenating two definitions: the node URI and the URL definition. Next Question: How do I access these Meta-data objects from PeopleCode? Most of us are familiar with the GetURL
PeopleCode function, but what mechanism does PeopleCode offer for retrieving a node's Content and Portal URI?
A PeopleSoft instance's node definitions are accessible through the %Session
object. The Session
object contains a method named GetNodes
which returns a collection of the instance's node definitions. A call to the collections FindItemByName
method returns a reference to a single node, which, of course, has properties of its own. Putting this all together, returning the Portal URI of a node named UCM would require PeopleCode that looks something like:
Local string &serverUrl = %Session.GetNodes().ItemByName("UCM").PortalURI;
By centralizing the base portion of the URL in a node definition, we save some administration overhead.
8 comments:
That was a nice info
Jim, any ideas why a file:// url to a file no lnger works with IE8? I had a page with URLs that pointed to various Org Charts. On IE8, when I click the URL nothing happens.
@Jeffrey, that is correct. IE 8 does not follow file:// based URL's that are on pages fetched from HTTP. This is a Microsoft security precaution. I suggest you look at the File Wikipedia reference and this Stack Overflow post.
Hi Jim,
I am trying place 5 OBIEE dashboard links across multiple PS Navigation collection pagelet.
Would you suggest using URL Maintenance or Nodes?
Thanks,
Tom
If you are using Navigation Collections, then I would create a node definition and then create CREF's for each dashboard. Then you can add the CREF's to your nav collections. The node definition will give you a single place to maintain the server information.
Thanks. This helps. :)
Tom
How can you transfer the user from one PeopleSoft application to another. Is that possible by normal URL or any thing need to consider...Please let me know
@Hari, yes, that is possible. Just define a node for your target system and create a CREF that references that node.
Post a Comment