Wednesday, October 31, 2018

PeopleTools 8.57 | Custom Banner/Company Info Configuration - Part 4

Thus far, the blog series (Part 1, Part 2 and Part 3) on the 'Custom Banner/Company Info' configuration - available via the Branding Framework in PeopleTools 8.57, detailed an evaluation of the new functionality as delivered. As we could see from some of the demos provided previously, this delivered 'Company Info' feature can currently only display static content such as images, links, text, etc. configured via a Rich Text Editor (RTE). That is, the content will be static and the same for all users.

Wouldn't it be great if we can similarly configure and generate the content of the CompanyInfo element using an 'App Class Method' implementation for dynamic content? But this is not an option that is available in the current delivered functionality.

We know that this is possible based on the options available for other elements within the header definition. For example, pthdr2logofluid.



It would simply be a matter of extending the CompanyInfo element to also allow 'App Class Method' as an implementation option.

Idea

The following idea has been created on the My Oracle Support PeopleTools Community. Please vote for this enhancement if you think it would add value to the existing functionality.

PT 8.57 | Custom Banner/Company Info Functionality - Allow App Class Method Implementation for Dynamic Content
https://community.oracle.com/ideas/23390

Extending 'Custom Banner/Company Info' Configuration for Dynamic Content

This post will detailed how we can extend the delivered 'Custom Banner/Company Info' configuration (PT 8.57.01) to generate dynamic content such as a personalized greeting message. This type of an extension will involve minor customizations.

Environment Used

HCM 9.2 PUM Image 27 originally on PeopleTools 8.56.09 upgraded to PeopleTools 8.57.01 (inaugural Cloud-First release). The PUM image provisioning and upgrade were administered using PeopleSoft Cloud Manager 7 running on Oracle Cloud Infrastructure - Classic.

Demo


Are there any configuration options?

Initially, I pondered if we can use any configuration to extend the existing functionality. For example, PeopleTools > Portal > Branding > System Data > Define Element Types > COMPANYINFO


In theory, we could use this configuration to override the Supporting Application Class for the CompanyInfo element. But soon I found that the amount of hard-coded references to the PTBR_BRANDING application classes in several locations basically rules this out as a viable option. I don't think the juice is worth the squeeze. Here are some examples of PTBR_BRANDING app class references.




Therefore, it is much easier to simply customize the appropriate code that generates the CompanyInfo content for Classic and Fluid respectively.

Dynamic Content Implementation

Include dynamic variable substitution parameters in RTE


We can also use the 'Source' option in the RTE to wrap the substitution parameter (:1) with HTML elements and attributes. In this example, I wrapped :1 within a <span> element and also included an id attribute which will allow us to apply targeted styles to the dynamic content as per our requirements.


Generating Dynamic Content for Classic

The following PeopleCode snippet was included in PTBR_BRANDING.Elements.CompanyInfoConfigurator.OnExecute - getHTML method.



Generating Dynamic Content for Fluid

Similarly, the following PeopleCode snippet was included in PTBR_BRANDING.UTILITY.GetCompanyInfoHtml.OnExecute - GetFluidBannerHtml method.



Custom CSS for Dynamic Content

Finally, we can use the id attribute (cskWelcome) of the dynamic content to target any custom CSS as per our requirements. In this example, the following CSS was appended to Classic (CSK_BRAND_CLASSIC_TEMPLATE_857) and Fluid (CSK_BRAND_FLUID_TEMPLATE_857) theme style sheets.



26 comments:

  1. Hi Sasank

    I have a question and was wondering if you have any insights where and which setting am i missing.
    we have a Forgot Password link setup for our external facing Ebilling portal. on the Webserver we have built 2 sites, one to go to the forgot password link. we have setup the forgot password fucntionality by following all the relevant steps like, creating the forogot password user profile, appropriate permission list and role and a seperate web profile and configuring the signin.html on the site2 to point to the forgotpassword web profile.
    also the signin.html on site1 is pointing to the href = <%=139%>

    but the problem is that when we actually click on the link the link resolves to <%=psCtxPath%>/psc<%=psHome%>_pwd/CUSTOMER/..... instead of /psp/

    do you know any setting where we can make the link go to /psp/ by default and not to /psc/

    would really appreciate your help on this.

    thanks:
    Ashwani Garg

    ReplyDelete
    Replies
    1. Are you sure the HREF value on your signin.html file is pointing to "<%=139%>?

      If you see the text.properties file under .../psoftdocs/domain, you will see that 139 is set to:
      139=Forgot your password?

      Basically, it is the label. What is the exact HTML code that is in your signin.html for the forgot Password link?

      Delete
    2. Hi its must have been a typo

      the exact html code is this:
      <%=139%>



      but the problem is that when we actually click on the link the link resolves to <%=psCtxPath%>/psc<%=psHome%>_pwd/CUSTOMER/..... instead of /psp/

      do you know any setting where we can make the link go to /psp/ by default and not to /psc/

      Delete
  2. sorry...somehow i am typing the correct text in your blog..but when i click on submit
    it autmatically trims
    <%=psCtxPath%>/psp<%=psHome%>_pwd/CUSTOMER/ERP/c/MAINTAIN_SECURITY.EMAIL_PSWD.GBL?languageCd=<%=languageCd%>"><%=139%>

    ReplyDelete
    Replies
    1. I am still confused. Like I said before, the <%=139%> is merely the label for the hyperlink. So, I would like to see the exact signin.html code to see what is going on.

      Can you share a link to your HTML code in signin.html using jsfiddle or github?

      At this stage, I really don't know how this URL is getting generated.

      Delete
  3. Replies
    1. You can save your code here or at least the part that is related to the hyperlink using jsfiddle and share the link:

      https://jsfiddle.net/

      Delete
    2. https://jsfiddle.net/ashruminates/mL4qkhr1/#&togetherjs=jdnEeScy1t

      Delete
  4. can u open this.? and see the code.?

    ReplyDelete
    Replies
    1. Yes. And as I suspected, the issue is the PSP is hard-coded in your HTML. That is why it is resolving to PSP.

      You can change your code to the following instead if you would like to resolve to PSC:
      https://jsfiddle.net/SasankVemana/4doj26kb/

      Delete
  5. Hi Sasank.. my concern is not that.
    I want the forgot my password link to open in PSP mode only. Not in PSC.
    the problem i am having is that despite the sign.html having the code = psp hard coded in it, when i click on the link, it is still going to psc.

    I have already tried the opposite scenario, where I have changed the code to PSC and then the link also is going to psc and the forgot password component is working fine and displaying the page without the portal branding, which is the appropriate behavior, since the page is opening in component mode

    ReplyDelete
    Replies
    1. What Tools release are you on?

      That page is converted to Fluid now. So, it will always resolve to PSC. Fluid does not use PSP servlet.

      You should still see your Fluid branding though. Is it not showing up?

      Delete
  6. I also had another problem i am working on (I have so many problems i am workig on and i am the sole developer on project)

    SO you remember i was asking you how we can default one customer portal to be classic and the employee portal to be fluid, I was able to figure out a way to make the landing page classic, by overriding the landing page iscript peoplecode at the CUSTOMER PORTAL web profile level by custom iscript peoplecode.

    However the problem is that if the Customer clicks on HOME BUTTON, then he will be directed to FLUID HOME PAGE.

    So my question is that, where can we modify the HOME LINK Peoplecode to redirect the CUSTOMER back to CLASSIC HOME PAGE again.??

    I have tried to look at the PT_BRANDING app package as well as the PTBR_BRANDING app package. i could not find the exact spot which is affecting and assigning the URL for home page.

    ReplyDelete
    Replies
    1. I believe you will need to review this weblib.
      WEBLIB_PTBR.ISCRIPT1.FieldFormula.IScript_StartPage

      If you hover over the Home Icon on the Classic page, what do you see in the browser status (bottom left corner)? You will need to figure out the code changes you need to make based on that.

      Delete
    2. hi Sasank

      WEBLIB_PTBR.ISCRIPT1.FieldFormula.IScript_StartPage is the exact start page which i have overridden with my custom start page which is something like WEBLIB_CUST.ISCRIPT1.FIELDFORMULA.ISCRIPT_CUSTSTARTPAGE


      2ndly when i hover over the HOME LINK on the classic home page, I see this:

      http://ai1057.XXX.XX/psc/ebilldev/CUSTOMER/ERP/c/NUI_FRAMEWORK.PT_LANDINGPAGE.GBL

      I have replaced my company initials with XXX

      Delete
    3. If you have already customized that IScript, then I am not really sure.

      Best to run a complete PeopleCode trace and review the logs. It should point you to the code that generate the hyperlink for the Home Icon in your circumstance.

      Delete
    4. anyway ..thanks a lot for your insights... i will try to put on the trace now :)
      If i find the solution..i will definitely keep you posted as i am sure you would like to know too :)

      regards:
      Ashwani

      Delete
  7. Hi Sasank

    I found a way to solve my problem.
    As i explained yesterday, the problem was that i wanted to re-direct the user to the classic page when clicking on the home button. Also, since we were using a custom branding header and footer for our customer portal.
    i simply added a new home link in the custom header and footer and deleted the delivered home button. on the custom link, i added an application package class peoplecode and created a custom method in my custom app class and used the getClassicHomepageURLForPortal function to get to the home page.

    it worked like a CHARM.. :)

    ReplyDelete
  8. Hello Sasank, Good Information Thank you!

    Should We run all default programs after creating the user profile ? Like -- Refresh SJT Class All ; Trans SJT tables
    My client wants to implement SSOgen for Peoplesoft SSO..

    1.Peoplesoft SSO
    2. SSOGEN

    Any recommendations please?

    ReplyDelete
    Replies
    1. I would recommend the following PeopleBook details when to run the SJT refresh processes:
      https://docs.oracle.com/cd/F11510_01/hcm92pbr28/eng/hcm/hhaf/task_RefreshingSecurityJoinTables-e32948.html#u19b65988-9f55-490d-923a-5d145b320147

      Regarding SSO, there are severals ways to implement SSO in PeopleSoft. I don't have any experience with SSOGEN specifically to provide any recommendations. You may want to reach out to SSOGEN sales/support teams and/or Oracle Support/Consulting.

      Delete
  9. Hi Sasank,

    Thanks for your information. I am new to Peoplesoft. I am trying to add some text to Company Info banner. I was not able to find Company info link in Default Header Fluid page under below navigation.
    Peopletools>Portal>Branding>Default Headers and Footers.

    My requirement is to differentiate the instance like Prod or test or dev. Can you please help me out. Any help is appreciated!!

    ReplyDelete
    Replies
    1. If you are on PeopleTools 8.57, then you will need access to the following role:
      Company Info Administrator

      Refer: https://pe0ples0ft.blogspot.com/2018/10/pt857-branding-access.html

      Delete
  10. Hi Sasank,

    We implemented the custom header in 8.58. We noticed that in 8.59 the header doesn't work the same on Classic pages. For some reason when we put the code in on PTBR_BRANDING.Elements.CompanyInfoConfigurator the header icons (home, search, ellipse, etc) aren't lined up correctly. The code works perfectly for Fluid. If I take the code out, the header icons line up fine.

    Thanks

    ReplyDelete
  11. Hi Sasank,

    Thanks for the info.

    Need your input. We have implemented PeopleTools 8.60 and would like to display static text on top the right hand side of the Homepage that is behind the Tiles. Tried different things, does seem to be working. Do you have any idea?

    ReplyDelete