Roles attached to a component (portal_uri_seg2) or content reference (portal_objname)
The SQL will pull Roles assigned to a specific component.
PeopleSoft Sample Code is a book where members can share their knowledge with other PeopleSoft users by listing sample code/snippets, tips and techniques.
Some snippets are just syntax, and others are examples, functions and so on. You can review and enhance ones already submitted by using the comment form under each post.
The picture below shows a Security folder and 2 sub-folders (User Profiles and Permissions & Roles). You can also notice that each sub-folder has 4 more links listed below it (in addition to the More... link). If you are wondering why 4 links and not 6 or 10 links, well, it is 4 links because this is what I want it to be.
How can you set the number of links available under a Portal folder?
Navigate to PeopleTools > Portal > Portal Utilities > System Options and update "Maximum Child Links" to 4.
I have been used to turn to HideScroll and UnHideScroll functions to hide/unhide grid on a page. These two functions however, remain for backward compatibility only.
The functions have been replaced by HideAllRows and ShowAllRows methods. The methods are equivalent to a loop setting the visible propertly of each row of the rowset to false.
For the code to work though, you need to place your peoplecode in a parent rowset and execute it against a child rowset.
A sample code to read a file using file layouts and insert data read into a record.
The query will help you find users with their email addresses for a certain Role Name.
Here is a quick Application Engine section that looks up user's email addresses under a certain ROLE and sends an email notification regarding, well, what ever you'd like.
First, you would need a "Do Select" step to loop through the email addresses (if more than one) and call the PeopleCode step below it to send the email. Your Do Select should have the following SQL:
This was kind of interesting to figure out. What I was going after is the following. I had a drop down box on a page that shows some Business Units. The values however need to be dynamic and change depending on the user viewing/accessing the page.
For example, user1 should only see 52024, 12456 but user2 should be allowed to see 52024, 12456, 45648, and 10235.
To accomplish this I've created a table to store values for each user (lets call it TABLE_1). TABLE_1 has 2 fields (oprid, and business_unit). So now, we have 2 users on the table along with their associated business units.
The 2nd step is to create the dynamic view to pull business units specific to each user. The view will only have one field and that is the business_unit field.
A very handy PeopleCode function to check for a user role(s) and perform specific actions depending on the value returned.
|Peoplesoft Web PIA installation||PeopleSoft Technical||03/15/2017 - 2:20am|
|Populate Multiple Grids on a same Page with diff output based on conditions.||PeopleSoft Technical||03/04/2017 - 1:35pm|
|Updating a row using Peoplecode - Component Interface.||PeopleSoft Technical||02/21/2017 - 11:26pm|
|To load CSV file data into staging table without using file layout||PeopleSoft Technical||01/15/2017 - 8:31am|