Welcome to my Peoplesoft/Oracle blog. I wanted to create this blog to help other developers and colleagues with coding samples.(HCM, CRM, SA and CS mods) The views expressed on this blog are my own and do not necessarily reflect the views of Oracle / Peoplesoft. Likewise, the views and opinions expressed by visitors to this blog are theirs and do not necessarily reflect my opinions or the opinions of Oracle / Peoplesoft.
Monday, January 5, 2009
PT_BRANDING - App Package pcode changes
Here is a great mod to change the greeting within your PIA environment.
PT_BRANDING.BrandingBase.OnExecute (Application Package Peoplecode)
Within this method:
method GetIScriptHPDefaultHdrHTML
/+ Returns String +/;
Local string &ActiveTab, &PersHTML, &TabHTML, &cookieJSURL, &refreshHPJSURL, &Today, &Greeting, &homepageJS, &EntHeaderHTML;
Local ApiObject &Portal;
REM Get the active tab;
&ActiveTab = %Request.GetParameter("tab");
&Portal = PortalOpen();
%This.GetHPTabHTML(&Portal, &ActiveTab, &PersHTML, &TabHTML);
/* Start - ASU_UT0100 - 11/2007 - J.McMahon - Adding user and environment to branding */
/* &Greeting = &Portal.Homepage.Greeting; */
Local string &Current_date;
SQLExec("Select to_char(SYSDATE,'MM/DD/YYYY') from DUAL", &Current_date);
&Greeting = %UserId | " on " | %DbName | " " | &Current_date;
/* ASU_UT0100 - End */
&Portal.Close();
&cookieJSURL = %Response.GetJavaScriptURL(HTML.PORTAL_COOKIE);
&refreshHPJSURL = %Response.GetJavaScriptURL(HTML.PORTAL_REFRESHPAGE);
&homepageJS = GetHTMLText(HTML.PORTAL_HP_JS_INCLUDE, &cookieJSURL, &refreshHPJSURL);
&Today = "";
&EntHeaderHTML = %This.GetUniHeaderHTML(&PersHTML, &Today, &Greeting, &homepageJS, &TabHTML);
Return &EntHeaderHTML;
end-method;
Also, change within this method: GetUniHeaderHTML
/* Start - ASU_UT0100 - 11/2007 - J.McMahon - Adding user and environment to branding */
/* &Greeting = &Portal.Homepage.Greeting; */
Local string &Current_date;
SQLExec("Select to_char(SYSDATE,'MM/DD/YYYY') from DUAL", &Current_date);
&Greeting = %UserId | " on " | %DbName | " " | &Current_date;
/* ASU_UT0100 - End */
Subscribe to:
Posts (Atom)