Thursday 14 August 2014

Open UI - existing browser scripts might cause nightmare

In my company, we are aiming to go-live with Open UI in 3 months time. So, we enabled Open UI and ran a round of regression tests. In round one – we got around 300+ defects logged! with testing still going on.

On close observation, many areas the functionality was broken due to existing browser scripts at various Applet and BC level. I thought of writing a quick note to you guys as to how to go about tackling these. Of course there are various other reasons for your broken functionality which I won’t be covering here.

Step 1: Identifying the objects where browser scripts are present.
The tedious way would be to do a repository flat search to identify the objects having browser scripts and reviewing one by one. I found a very easy way to identify – output of GenB script. If you go into your web server or client /PUBLIC/ENU/srf****/bscripts/all. You will find all the browser script details here. 

image

Step 1: Reviewing existing browser scripts

I would say rather than jumping and converting every browser script into PM/PR Open UI model, first test if the current functionality is working as expected in the area around above applets and BCs identified. See if you can fix by making minor tweaks to your Applet/BC browser scripts.

Example for you: One of the most common issue I observed in my case was missing double quotes around CancelOperation and ContinueOperation in most places. For instance on Account screen, user wasn't able to create new records – as none of the drop-downs were working. The first thing I did was to check the console on Chrome. It was clearly pointing to missing quotes around ContinueOperation in the script. Below is the current browser script on Account BC. 

function Account_BusComp_PreSetFieldValue (fieldName, value)
{ 
 if (fieldName == "Account Status") 
 {
  if(this.GetFieldValue("Account Status") == "Active" && value == "Inactive")
  {
   l_MsgText = "Please check Products are inactive when making an Account inactive";
   TheApplication().SWEAlert(l_MsgText);
   return (ContinueOperation);
  }
  else if(this.GetFieldValue("Account Status") == "Active" && value == "Closed")
  {
   l_MsgText = "Please check Products are inactive when making an Account Closed";
   TheApplication().SWEAlert(l_MsgText);
   return (ContinueOperation);
  }
 }
 else
 {
  return (ContinueOperation);
 }}

So, I went to /PUBLI/ENU/srf****/bscripts/all; opened the js file: buscomp_account.js; added double quotes around ContinueOperation. Did the clear cache on my browser and wallah everything started working on Account screen. You can make as man changes as needed and test before you go and do the final change in your Siebel tools to the script.
Step 3: Modify the identified browser scripts
Option 1: as mentioned above, you can make minor changes to existing Applet/BC level browser scripts to make them work. This will involve srf changes in future ifyou need to enhance or make any changes.
Option 2: Non srf based option. Remove the Applet/BC browser script and add equivalent Applet PR/PM. This will enable you to remove srf dependency and make changes on the fly as and when needed in future.
Let me know if any questions.
Shiv

No comments:

Post a Comment