Limit Emailed Reports
Selective Report Distribution via Email
Posted on 1/10/2007 (originally published in print on 11/1/2004)
by Cayce Balara

A question popped up on an internet forum I frequent concerning this topic recently, and as I thought about it I realized it was one of those "I wonder how you could do that" items that wasn't going to let go of me until I figured it out. I played around a little in Application Designer hunting down pages and seeing what's what and came up with a couple of answers. I hope someone out there can put this to good use.
What is Delivered
PeopleSoft 8 has some fairly robust report distribution options, including the ability to send any report created in the system to any email address, internal or external, in a nice, neat PDF document (the P in PDF stands for Portable). The corporate world being what it is these days, this is not necessarily an ideal situation. PeopleSoft doesn't provide a very configurable manner for enabling access to the distribute-via-email options. The quickest/easiest ways to enable or disable this functionality are via the process definitions (to do it report-by-report) or via deleting a row or two out of a particular table (to turn it off completely). Both of these methods, however, apply system-wide. It's either on for everybody or off for everybody.
Method #1
I came up with a few ways of selectively restricting access to the ability to distribute-by-email. The first is very easy and relies on the fact that in order to distribute by email you have to click a button. On the Process Request Dialog page for any process, there is a small icon on the right-hand-side of each process listed. Hovering over this icon shows a "Distribute To" tooltip. Simply choosing EMAIL as your output type and running the process will cause the email to be sent to you only, by default. If you want to send the email distribution to anyone else, you've got to click the distribution icon and either choose a User/Role or enter one or more email addresses. If that button is disabled, then you can't get to the page. If you can't get to the page, then you can't enter the email address, and the report isn't going to anyone other than you.
So, let's disable that button selectively depending on your security. Create a new security role called "EMAIL DISTRIBUTION." Open up the Process Request Dialog page PRCSRQSTDLG. The push-button in question is PRCSRQSTDLG_WRK.DIST_DETAIL_BTN, located in the grid on that page, just to the right of the column labeled FORMAT. Open up RowInit() PeopleCode for that button and add the following:
To continue reading this article you must have a current VP1 Subscription.