jump to navigation

Using the PIA Welcome Message June 13, 2007

Posted by Duncan in Administration, PeopleSoft, PIA, SQL.
trackback

The PIA Welcome message, or Portal Greeting is a pretty simple piece of functionality, but I’ve not seen it used on a single client site. For those that haven’t seen it before, it looks like this:

Welcome Message example

The welcome message is stored on a per user basis, it is set using the ‘Personalize Content’ link on the Homepage, and it is stored in the table PSPRUHDEFN. If updated via SQL, it won’t appear instantly unless you either bounce the App Server (and clear the cache) or increment the versions in PSVERSION and PSLOCK. There is an (Oracle) sql script to update the message – so it appears instantly – at the foot of this post.

A more constructive use of the greeting would be to alter it slightly. Particularly during development and testing it would be useful to display the logged on user and the environment name. An extremely simple change to a Tools object (yes, I know, but it’s such a small change that the upgrade implications will be minimal) allows this.

Updated Portal Greeting

There are two steps, output the user/database in the greeting and make the message appear on every page, not just the Homepage.

1. Output the user/database in the greeting

Open Application Package PT_BRANDING, Application Class BrandingBase, Method GetIScriptHPDefaultHdrHTML.

Replace:
Greeting = &Portal.Homepage.Greeting;

With:
/* <name> – 13/06/07 – Adding user and environment to branding */
/* &Greeting = &Portal.Homepage.Greeting; */
&Greeting = %UserId | ” on ” | %DbName;
/* <name> – End */

2) Make the message appear on every page, not just the Homepage.

If you want it to display on all pages, you need to edit Application Package PT_BRANDING, Application Class BrandingBase, Method GetUniHeaderHTML and GetUniHeaderHTML_PIA.

Add the following just before the ‘If &navTheme.isNS4x()’:
/* <name> – 13/06/07 – Adding user and environment to branding */
&Greeting = %UserId | ” on ” | %DbName;
/* <name> – End */

Oracle SQL Script to update the message for a single user

–===================================================================
define portal=’EMPLOYEE’
define oprid='<oprid>’
define message='<desired message>’

UPDATE PSLOCK SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME IN (‘CRM’, ‘PRUH’);

DELETE FROM PSPRUHDEFN WHERE PORTAL_NAME = ‘&portal’ AND OPRID = ‘&oprid’;
DELETE FROM PSPRUHTAB WHERE PORTAL_NAME = ‘&portal’ AND OPRID = ‘&oprid’;
DELETE FROM PSPRUHTABPGLT WHERE PORTAL_NAME = ‘&portal’ AND OPRID = ‘&oprid’;
DELETE FROM PSPRUHPERSPGLT WHERE PORTAL_NAME = ‘&portal’ AND OPRID = ‘&oprid’;
DELETE FROM PSPRUHDEL WHERE PORTAL_NAME = ‘&portal’ AND OPRID = ‘&oprid’;

INSERT INTO PSPRUHDEFN ( LASTUPDDTTM, LASTUPDOPRID, OBJECTOWNERID, VERSION, PORTAL_NAME, OPRID, PORTAL_GREETING254)
SELECT sysdate, ‘&oprid’, ‘ ‘, VERSION, ‘&portal’, ‘&oprid’, ‘&message’
FROM PSLOCK WHERE OBJECTTYPENAME = ‘PRUH’;

INSERT INTO PSPRUHTAB ( PORTAL_NAME, OPRID, PORTAL_OBJNAME, PORTAL_SEQ_NUM, PORTAL_LABEL, PORTAL_COLLAYOUT, PORTAL_STG_NAME)
VALUES ( ‘&portal’, ‘&oprid’, ‘DEFAULT’, 0, ‘My Page’, 3, ‘PR_EMPLOYEE_DEFAULT’);

INSERT INTO PSPRUHTABPGLT ( PORTAL_NAME, OPRID, PORTAL_OBJNAME, PORTAL_OBJNAME_PGT, PORTAL_COL_NUM, PORTAL_ROW_NUM, PORTAL_MINIMIZE)
VALUES ( ‘&portal’, ‘&oprid’, ‘DEFAULT’, ‘MENU’, 1, 1, 0);

UPDATE PSVERSION SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME = ‘SYS’;
UPDATE PSLOCK SET VERSION = (SELECT VERSION FROM PSLOCK WHERE OBJECTTYPENAME = ‘CRM’) WHERE OBJECTTYPENAME = ‘CRM’;
UPDATE PSLOCK SET VERSION = (SELECT VERSION FROM PSLOCK WHERE OBJECTTYPENAME = ‘PRUH’) WHERE OBJECTTYPENAME = ‘PRUH’;
UPDATE PSVERSION SET VERSION = (SELECT VERSION FROM PSLOCK WHERE OBJECTTYPENAME = ‘CRM’) WHERE OBJECTTYPENAME = ‘CRM’;
UPDATE PSVERSION SET VERSION = (SELECT VERSION FROM PSLOCK WHERE OBJECTTYPENAME = ‘PRUH’) WHERE OBJECTTYPENAME = ‘PRUH’;
–===================================================================

Advertisements

Comments

1. Jim J. Marion - July 2, 2007

Well done. It is good to see people digging into the branding objects.

2. Jim J. Marion - July 2, 2007

Another idea… For security reasons, many PeopleSoft administrators avoid displaying the OPRID and database name through the PIA. To facilitate this while avoiding reaplying this change every time you copy PRO to TST/DEV, you could wrap your app package change in an if statement that uses &Portal.Homepage.Greeting in PRO, but uses %UserId | ” on ” | %DbName when in DEV/TST.

3. PeopleSoft Tipster - July 3, 2007

Good point. I’d probably not advocate moving this customisation into Production, but your solution is a much smarter idea as it removes the need for an extra step each time Prod is cloned. I like it …

4. Stephen Fols - August 1, 2007

Why is it not a good idea to display the oprid and database name in prod?

5. PeopleSoft Tipster - August 15, 2007

Just from a security point of view. Anyone looking over your shoulder can see your username, and then they have half of your username/password combination.

It’s not something that worries every company, but some don’t like usernames to be shown.

6. Hexawala - February 19, 2008

Hi, I was asked to Display a Welcome message to the users. I found this solution very useful. Since we have multi language users, How can we display the Messages in the Language that the user logged in. Any help is highly appreciated.

7. Hexawala - February 19, 2008

Hi
Got it. Used the %Language_User … as follows.

If %Language_User = “ARA” Then
&Greeting = “أنظمة الإدارة المدرسية”;
Else
&Greeting = “School Mangement System”;
End-If;

Thank you All.

8. ba - June 21, 2008

cant change the PT_BRANDING package. it is saying read only why ???

9. PeopleSoft Tipster - June 23, 2008

This might be something as simple as the user you are using doesn’t have the correct privileges. If you’re the sysadmin you could always grant yourself the ‘PeopleSoft Administrator’ role then relogin to App Designer again.

10. ba - July 2, 2008

i do have the ‘PeopleSoft Administrator’ and i am using super user PS/PS. am i missing anything else….

11. RN - August 14, 2008

Tried the code changes suggested above but didn’t get the greetings. Am I missing something? I am assuming that the sql updates are not necessary if the Application package changes are made? Is this change particular to a specific branding/theme?

12. PeopleSoft Tipster - August 14, 2008

Once you make the App Package changes then you need to do one of the following:

1) bounce App Server and Clear the cache.

2) run the SQL listed.

This isn’t for any particular branding or theme.

13. RN - August 15, 2008

Did all that.. I thought that the SQL listed below was for a single user and a different approach to the app package changes. Well did the sql, did all the cache cleaning but still didn’t work..will keep tugging at it.. thanks for the blog

14. Devesh Padmanabhan - August 19, 2008

What if I wish to display the Full Name (FIRST_NAME and LAST_NAME) instead of the User ID. How can we move ahead with this?

15. PeopleSoft Tipster - August 19, 2008

RN > are you using anything like Portal, or just an application like HR, Financials, CRM …

Devesh > If you already have the OPRID you can look up the name from the user profile, or just get it via SQL. There are plenty of examples in the code if you need help.

16. Devesh - August 25, 2008

Hi,

I am not a PeopleSoft Developer. I would apreciate if you could write the code (PeopleCode/ App Package Code and not the SQL), so that I can test it in my instance.

Thanks in advance,
Devesh

17. PeopleSoft Tipster - August 25, 2008

Devesh > It’s a little unrealistic to expect me (or any other blog author) to provide a free solution just because you aren’t a developer yourself. Most readers are grateful enough that they’re given 80% of the solution. If you really can’t find the time to learn (PeopleBooks is a free resource) then perhaps getting someone in might be the best bet.

18. RN - August 27, 2008

I am using Ent. Portal 8.8. Made all the changes at the specified places. Ran the scripts, cleaned cache.etc.. No luck..Thanks for your input..

19. Devesh - August 28, 2008

Ok. No issues. I’ll check the PeopleBooks for reference. Thanks anyways for your reply.

20. PeopleSoft Tipster - August 28, 2008

RN > I’ve not tried this on Enterprise Portal, only on the other applications. I would assume portal would be different so you’ll probably have to do a fair bit of tweaking to get it to work. It’s probably worth checking out though as it may well be easier to achieve the same result in Portal than HR …

21. simrose - September 11, 2008

Why we need to run Oracle SQL Script , why by just changing the application package code will not do the need full.Can u please xplain the need for Oracle SQL Script..
Thanks in Advance

22. Tipster - September 22, 2008

The SQL updates the message to give a specified message to a single user. It’s a quick and dirty update. The PeopleCode version is the method to use if you’re doing it ‘properly’.

23. neel - November 4, 2008

Thanks for the update,

I am totally new in this arena and doing peoplesoft admin for last 2 years.

recently got an assignment of our peoplesoft hompeage branding.

please refere any red paper if possible or share me the activity list that is needed from peoplesoft admin to perticipate in branding.

Regards
Neel

24. Tipster - November 4, 2008

You’ll want to look in PeopleBooks and the red paper library on Customer Connection.

25. Navin Sahay - January 8, 2009

Hi! Everybody,

Good Morning!

Actually, I want to hide the ‘Home’ link [which is coming top right of every page] for some pages.

I have made changes in PT_BRANDING (Application Package), in class ‘HeaderLinkPIA’ and ‘HeaderLink Base’.

My addition in ‘HeaderLinkPIA’ class in PT_BRANDING (Application Package):

To hide the ‘AddToFavorites’ while going to Careers page(Root > SelfService > Recruiting Activities > Careers)

I have added the below code in the method ‘SetAddFav’

/* If &CRef.Name = “HC_HRS_CE_GBL” Then
&DisplayAddToFavLink = False;
End-If;

If &CRef.Name = “HC_HRS_CE_GBL2” Then
&DisplayAddToFavLink = False;
End-If;
*/

*** And it worked successfully ***

So, I have tried to apply the same concept to hide the ‘Home’ link, I have added one method ‘SetHomeURL’ in ‘HeaderLinkPIA’ class. Tried to catch the HTML for ‘Home’ link, like ‘PORTAL_HEADER_ADDTOFAVORITES’ is the HTML for the ‘AddToFavorites’ link. However i haven’t found the exact HTML with button coding in for the ‘Home’ link, as i have found button coding n all in ‘PORTAL_HEADER_ADDTOFAVORITES’ for ‘AddToFavorites’ link.

I have found many HTML for ‘Home’ like ‘PORTAL_HOME_1’, ‘PORTAL_HOME_HEADER’, ‘PORTAL_HOME_SKELETON’, ‘PR_EMPLOYEE_HOMEPAGE_DESIGNERA’, ‘PT_HOME_SKELETON’ etc. and tried to hide the link as i have done with ‘AddToFavorites’, BUT NO SUCCESS…. 😦

Anyone, please please please help me.

Warm Regards,
Navin

26. ernst - June 30, 2009

Thanks Tipster, saved me a lot of time to figure the tables out myself :-). Using it in DEV instances to tell the tools and bundle level.

27. Portal Greeting on Tools 8.50 « PeopleSoft Tipster - May 21, 2010

[…] posted before about using the Portal Greeting / PIA Welcome message to display something useful here.  I’ve recently come to implement this on a client and discovered that the method I […]

Teresa Chan - October 25, 2012

I try modified PT_BRANDING

inside BASE BRANDING

search for
&Portal.Homepage.Greeting; */

replace with
&Greeting = ” Database: ” | %DbName;

to show database name, but it only show the database name on the first page after login, the database name doesn’t showup when you start navigating to another page, meaning the change can only show up when you click on “Home” key or the first page after login to PeopleSoft. Anyone know how to make the change to carry the database name through out the application, just like the “Home” key, or the “Sign out” key?
By the way, I’m talking about Tools 8.52.

Tipster - October 26, 2012

For pages other than the Homepage look at PT_HNAV_TEMPLATE (called from WEBLIB_PT_NAV.ISCRIPT1.FF.buildIframeTemplate())


Sorry comments are closed for this entry

%d bloggers like this: