Wednesday 30 July 2014

Open UI Customization - iHelp error - get rid of it!

In my previous blog, I explained how to get Home page Salutation HI Error sorted out with more meaningful information. If you haven’t see it then, check it out here.

Extending it further, on all Home Pages (viz. Account Home, Opportunity Home, Activity etc)you see this HI Error message in place of iHelp.
image

As you know Open UI doesn’t support any of the SI (Standard Interactivity) based HI applets. Until Oracle comes up with a fix for iHelp or you are one of those organizations who doesn’t use iHelp then, you can use below approach to get rid of that section at client side.

After the change this is how it would look like,
image

Again, So I thought of finding my way – without srf – pure js based one. All I am doing is finding the container for iHelp and removing it from DOM.



So, let’s look at the high level steps:
  1. Create a new custom View PR – call it - GlobalHideiHelpViewPR.js. You can use my template available here: Template-ViewPR.js. Just save it and replace MyJs with GlobalHideiHelpViewPR.js
  2. You need to add your logic under GlobalHideiHelpViewPR.prototype.SetRenderer() function in your ViewPR
  3. Here, you need to get the reference to the iHelp container and remove it.
Let’s look at the SetRenderer function from ViewPR in detail.


GlobalHideiHelpViewPR.prototype.SetRenderer = function () {
    SiebelJS.Log("Custom PR " + PRName + ": SetRenderer method reached.");
    var oAppletMap = PM.GetAppletMap();  //get applet map object
    //some variables we need later
    var oApplet, sAppletName, oAppletPM;
    var sAppletId; 
    for (var applet in oAppletMap) {  //loop through applet map
        oApplet = oAppletMap[applet]; //get current applet object
        sAppletName = oApplet.GetName(); //get applet name 
        if (sAppletName == "Screen Home Task Assistant List Applet") { // if it is salutation applet
            oAppletPM = oApplet.GetPModel(); //get Applet PM
            sAppletId = oApplet.GetFullId(); //get AppletFullId. You need this for accessing existing placeholder            
            $("#s_" + sAppletId + "_div").remove();//Remove the div for iHelp!        
        }
    }};
Follow the usual steps to register your View PR to your Opportunity Home Page.Clear cache and test!
Newcomers see below steps to register you View PR to your home page:
Step 1: Register your /custom/GlobalHideiHelpViewPR.js in Manifest Files Admin (if not already done): Go to Administration - Application > Manifest Files and add a new entry with the following value:
Name: siebel/custom/GlobalHideiHelpViewPR.js


Step 2: Register your new ViewPR in Manifest Admin. Go to Administration Application > Manifest Administration and add the following :
In UI Objects:
    Type: View
    Usage Type: Physical Renderer
    Name: Opportunity Screen Homepage View
In Object Expression:
    Expression: Desktop
    Level : 1
In Files:
    Name: siebel/custom/GlobalHideiHelpViewPR.js

image

I hope you are enjoying my blogs. Let me know if you have any questions.

Shiv

No comments:

Post a Comment