More javascript adventures in PS

I have recently completed prototyping a rather challenging problem that involves printing a document from a PeopleSoft page. The challenge is to find a way to print a separate document directly from the page. The functional SME somehow has an expectation that this functionality should behave like a native application — where by a click a button on the page, he will be presented by the Windows print dialog; the user can proceed and a document that is not the page being displayed will be printed on the user’s printer. Now, PIA applications are accessed via a web browser. Because of this, the features available to the application is limited by the web browser it is running on.

My first thought is this functionality would not be possible to implement without developing a plug-in. However after meditating on this for some time, an idea came over me on the possibility of using an iframe. Initial testing showed promise, so I proceeded with the solution.

The implementation did not went quite as smooth as I expected. There were a few other major challenges, and it was quite a learning experience. At one point I did get worried the final solution would become too complex to be manageable. Thank God the ultimate solution did turn out be simple enough and easy to implement on other pages.

There is one thing I developed on this project that I think will still be useful for me in the future. On some level, I’ve figured out a structured way for PeopleCode to assign a javascript to execute on a page. At first glance, this seems as simple as dropping an HTMLArea on the page, and populating it with javascript code, as described here. However, this will not work if you have some javascript that should only be executed once (for example, when user clicks a PeopleSoft button). You could assign the HTMLArea to derived field and populate the control on FieldChange. But the value of the derived field will not be cleared after the javascript code executes, and the javascript will keep executing on subsequent page refreshes. I will discuss more detail on this at a later article.

9 thoughts on “More javascript adventures in PS

  1. Dear ChiliJoe,

    I to.. have a requirement to create a web page where a mgr can push a buton on that page and print off a PIA page that contains salary change notification info. I’m not that well versed in Javascript so any help you could provide w/be GREATLY appreciated.

    What ideally they want is to just print the salary change info and NOT print the Psoft path info or the print button on that document.

    Thanx,
    = Mike R. =

  2. ChiliJoe:

    Are you going to publish your solution on this subject? I would like to create some button driven print pages on one of our bolt apps in PS HCM. Any help???

  3. How can I save a PeopleSoft Online Page on the local machine?..Say I have a button called ‘Save’..on clicking that…I should be prompted for the destination & after that the page should be saved as a HTML page!

  4. Hi Joe,

    I have a requirement where i need to stop the user entering certain special characters and few digits on a field in peoplesoft page. How to do that ? Any help would be great.

  5. Hi,

    I have 2 qns.

    1. On the search page, when the user clicks on Search button how do I make one of the list box items to disappear i.e. if a user logins through a particular menu, he should see only few list box columns, where as from other menu he should be able to see all the list box columns.

    2. When the user clicks on search button, how can we show only top 10 rows. I figured that we need to create a view which loads only top 10 rows and use this as the search record. But is there any other solution to it?

  6. Hi Kiran,

    For #1, you can use a different search record. There is an Override Search record functionality on the menu.

  7. Hi,

    This is really cool, I was searching on the net. No one has given up to this level of clean code. I really appreciate and it worked just fine and I got to know how to use JavaScript with PeopleSoft.

    Cheers,
    JGNath

  8. My next requirement is, Tooltip Text for any Text field on the page. For example I have a Emplid on the page (delivered) and I want to show some custom ToolTip/Hover text.

    I know that this is possible using JavaScript, but not sure how to go about it.
    Can anyone handled this situation before. I would appreciate if someone navigate on this.

    Thanks
    JGNath

  9. Hi,
    Is there a way to display a input box (only need 1 value) from the saveedit event using javascript , capture the data and pass back to a peoplecode variable ? Have not used any javascript in Peoplesoft as yet.
    Thanks,
    Dennis

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>