Friday, March 22, 2019

Enable/Disable Classic Plus without Customizations

Classic Plus was introduced in PeopleTools 8.56 as a means to unify the look and feel of Classic and Fluid PeopleSoft pages from a styling point of view. If you want a quick overview of how this works, you can go to youtube and watch this fantastic video created by PeopleSoft guru, Graham Smith.

https://www.youtube.com/watch?v=Cg7JmqEkPjk

As you can see in this video, PeopleTools team as well as the Apps teams are delivering (with every new release) many components that are Classic Plus enabled. But not all Classic components are Classic Plus enabled for various reasons. In cases where Classic Plus is not enabled on a desired component, or alternatively where Classic Plus is enabled as delivered but we may want to disable it on a certain component, we will need to enable it manually via a Component property (Classic Plus Theme Selection).

In such cases where we need to manually enable/disable Classic Plus, we incur some technical debt in the form of a minor customization to the components involved which needs to be maintained in the future.

Note: Merely enabling this property may not be sufficient to Enable Classic Plus in some advanced cases. Review the following  PeopleBook for more details.

Reworking Components for Classic Plus Display

Assuming, we are not dealing with any page refactoring complexities, then we can simply enable/disable Classic Plus using a PeopleCode function!

ConfigureClassicPlusComponent

According to Doc ID 2440035.1, this is a new function in PeopleTools 8.57, although I can see that is exists in PeopleTools 8.56 as well.

Oracle's PeopleSoft PeopleTools 8.57 New Features Overview (Doc ID 2440035.1)


Based on what I am seeing in some delivered code, it appears to be available in PeopleTools 8.56.06 and higher.


Anyway, why is this exciting? Because we can simply use this function in conjunction with Event Mapping and enable/disable Classic Plus without incurring any customizations.

Event Mapping App Classes

Enable Classic Plus

Disable Classic Plus

Event Mapping - Related Content Services

PeopleTools > Portal > Related Content Service > Define Related Content Service

Enable Classic Plus Service


Disable Classic Plus Service


Enable/Disable Classic Plus using Event Mapping Configuration

Let us say, we want to enable Classic Plus on a Classic component that is not using Classic Plus as delivered. We can simply create an event mapping configuration to associate the component with the 'Enable Classic Plus Service'.

As an example, let us use PT_THM_MACROSET component which is not using Classic Plus as delivered (Navigation: PeopleTools > Portal > Branding > Theme Macro Set). As we can see in the demo below, the 'Classic Plus Theme Selection' component property is not set for PT_THM_MACROSET by default. By associating the custom event mapping code which is part of our 'Enable Classic Plus Service' (SV_ENABLE_CLASSIC_PLUS), we can enable Classic Plus on this component without any customization. We can see that behind the scenes (by calling the ConfigureClassicPlusComponent function via Event Mapping PeopleCode), the 'Classic Plus Theme Selection' component property is updated without any effect on the last updated userid/datetime which means that this change will not be marked as a customization.


Similarly, let us say, we want to disable Classic Plus on a Classic component that is already using Classic Plus as delivered. We can simply create an event mapping configuration to associate the component with the 'Disable Classic Plus Service'.

As an example, let us use PEOPLECODE_TRACE component which is using Classic Plus as delivered (Navigation: PeopleTools > Utilities > Debug > PeopleCode Trace). As we can see in the demo below, the 'Classic Plus Theme Selection' component property is already set for PEOPLECODE_TRACE by default. By associating the custom event mapping code which is part of our 'Disable Classic Plus Service' (SV_DISABLE_CLASSIC_PLUS), we can disable Classic Plus on this component without any customization. Again, we can see that behind the scenes (by calling the ConfigureClassicPlusComponent function via Event Mapping PeopleCode), the 'Classic Plus Theme Selection' component property is updated without any effect on the last updated userid/datetime which means that this change will not be marked as a customization.


Environment Details

FSCM 9.2 PUM Image 30
PeopleTools 8.57.02

Concluding Thoughts

This post is not to suggest that this approach is best practice. While enabling/disabling Classic Plus, you will need to determine what works best for your lifecycle management procedures. It is as simple as that. What works for one customer might not work for another.

Personally, the prospect of automating the enable/disable Classic Plus customization through PeopleCode is very exciting. It is the main reason why I wrote this post. Additionally, combining that with Event Mapping provides an alternative 'customization free' approach in certain cases.

Further, we can see that this function/peoplecode logic is similarly used in the delivered 'Set Classic Plus' App Engine (EOCP_SETCP) which can be found in PeopleTools 8.56.06 and higher under the following navigation.

Enterprise Components > Common Utilities > Classic Plus Setup

PeopleBooks - Classic Plus Setup Page

If this setup page already exists in the application under Enterprise Components, why not simply use that instead? Yes, we should! But this setup page is only available in certain apps like FSCM and HCM. It is not yet available in Campus Solutions.

10 comments:

  1. At this point why not just SQL the update, or be ok with the components being marked as customised given that's the way the vendor designed it!

    ReplyDelete
    Replies
    1. Sure. Fair point. You can choose to do whatever approach (manual customization, SQL update, etc.) that works for best for your LCM processes.

      I am not suggesting that this is best practice. I am only demonstrating the fact that there is an option to automate the process of 'Enable/Disable Classic Plus' via PeopleCode.

      Delete
  2. Hi Sasank,

    Are you aware of any automated script to enable Classic plus theme across all Custom Components in PeopleSoft?

    We are on PUM 33.

    Thanks,
    Poornima

    ReplyDelete
    Replies
    1. Hi Poornima - I am not aware of any automated script that can enable Classic Plus on all custom components. But I wonder if we could write a simple App Engine and use the PeopleCode function referred in this blog to enable Classic Plus for a list of components.

      Delete
    2. Thanks Sasank, sure will give it a shot.

      Delete
  3. When the HR_DR_DIRECTREPORT component - for Manager Self Service - to select your employee is Classic Plus, the component which calls this Component through PeopleCode is automatically also Classic Plus.

    Classic Plus for that component is deselected, the PeopleCode function to undo it gives true (succeeded) and the IsClassicPlus function returns False (The Component is NOT Classic Plus)

    Does anyone know a way to work around this or is this a PeopleSoft bug, uhh feature ?

    ReplyDelete
  4. Hi Sasank,
    We have created an external portal and We have a requirement to hide global search, navigator and homepage button from there. For Fluid, we made changes on PT_HEADERPAGE and PT_LANDINGPAGE and it worked well. But when my component is classic page it doesn't work. Do you have any idea on how can we hide header buttons on classic plus page on a particular portal.

    Thanks,
    Payal

    ReplyDelete
    Replies
    1. I would recommend that you use the Assign Themes Page and setup different Themes for different portal. That way, you can easily contract the display.

      https://pe0ples0ft.blogspot.com/2016/08/peopletools-branding-role-based-themes.html

      As for the Classic side, you will need to update the 'Header' used in the Theme using the 'Define Headers' page under Branding.

      Delete
  5. Sasank, how can you use this if you have a component that is shared across different menu's? I tried to add an Evaluate menu statement in the method, but the event mapping takes place across the entire component regardless of the menu. An example is the CLASS_SEARCH Component. It is registered to SA_LEARNING_MANAGEMENT and SA_LEARNER_SERVICES. I want the Disable Code to fire off only on the SA_LEARNING_MANAGEMENT not the SA_LEARNER_SERVICES. Can this be done with event mapping?

    ReplyDelete
    Replies
    1. I really apologize for the delay in getting back to you.

      This is a great question. The Event Mapping Frameworks works based of the Content References (aka CREFs). Have you tried looking for the content references for both the menus? If there are separate CREFs for each, then the event mapping code could also be separated.

      Delete