本文主要是介绍Using the PIA Welcome Message,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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:
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.
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’;
–===================================================================
Comments»
这篇关于Using the PIA Welcome Message的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!
Well done. It is good to see people digging into the branding objects.
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.
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 …
Why is it not a good idea to display the oprid and database name in prod?
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.
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.
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.
cant change the PT_BRANDING package. it is saying read only why ???
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.
i do have the ‘PeopleSoft Administrator’ and i am using super user PS/PS. am i missing anything else….
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?
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.
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
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?
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.
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
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.
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..
Ok. No issues. I’ll check the PeopleBooks for reference. Thanks anyways for your reply.
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 …
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
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’.
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
You’ll want to look in PeopleBooks and the red paper library on Customer Connection.
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
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.
[...] 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 [...]