Monday, 24 March 2014

Siebel Open UI - How to fix Form applet display issue in Chrome

Open UI form applets have some issue, when it rendering in Google Chrome.The controls are overlapped as shown below.
Solutions
Fix without JS
-------------
Open a CSS file your application referring paste the below css

td {
    border: 1px solid transparent;
}

clear the cache and try :-)


-------------------------------------------------------------------------------------
Fix with JS (as per oracle doc)
As per oracle technical document we can fix this issue with a piece of code

if (typeof(SiebelAppFacade.ChromeSpaceFix) == "undefined") { Namespace('SiebelAppFacade.ChromeSpaceFix'); (function() { SiebelApp.EventManager.addListner("postload", ChromeTdSpaceFix, this); function ChromeTdSpaceFix() { try { $("#_svf0 table.GridBack").find("tr").children("td").each(function(index) { var regex = /(height)(\s*):(\s*)([^;]*)/, el = $(this), st = el.attr("style"), match = regex.exec(st); if (match && Number(match[4]) && el.is(":empty") && el.siblings().length != el.siblings(":empty").length) { st = st.replace("height", "x­height"); el.attr("style", st + "height:" + Number(match[4]) + "px;"); } }); } catch (error) { // Nothing to do. } } }()); }

Now you can add this file as Platform common (8.1.1.9 & 8.1.1.10) or Application -> common as (8.1.1.11)
you can see the above fix from here

Thursday, 13 March 2014

Siebel OpenUI : Calender Issues

Siebel OpenUI : Calender Issues

Siebel OpenUI currently not supporting SI Classes and Applets referring to that type. That is why Salutation applets are shown with a "question mark". Open UI will not render these classes of applet.
Calender functionality is one of the main features of Siebel. Many Customers are using this feature to schedule their activities.In Siebel we have two kinds of Calenders. HI calender and SI type. Normally in home pages you can see SI calenders and that will not work in OpenUI. Even though OpenUI render this applets, that doesn't work properly.  Siebel Non OpenUI version needs SI applets in its home page. So we need to toggle these two applets in between OpenUI and Non OpenUI.

In order to do that, we can use Personalization.

In the home page view you can Include both Calenders. Now got to Administration- Personalization -> Applets.
Create two new records for two applets (HI & SI)

To display in HI: GetProfileAttr("IsOpenUI") < 1 OR GetProfileAttr("IsOpenUI") IS NULL
To display in OUI: GetProfileAttr("IsOpenUI") > 0


GetProfileAttr("IsOpenUI") will be 1 in OpenUI applications.

Tuesday, 4 February 2014

How to set your custom theme as Default theme

In Siebel Open UI, user can change theme from their user preferences.  If they did not choose any thing a default theme will get loaded. By default that is "Gray Tab".

Suppose you created a new theme called "Golden Tab" and you have to make it by default, Otherwise we have to force our clients to change their theme from their user preference and that is not recommended.
You can change this thing by using some tool level change.

In order to do that please follow the steps.


1. Using Siebel Tools, navigate to "User Preferences" BC.
2. Update the calculated value for field "Behavior/DefaultTheme" to "<custom theme>"
3. Update the Predefault value for field "Behavior/DefaultTheme" to "<custom theme>"
4. Compile the changes and re-test the behavior

You will need to remove the user pref file (spf) file to make the changes take effect.


Monday, 6 January 2014

GetService and theApplication() are Not Working In Browser Script In Siebel 8.1.1.11 (SIA)

GetService and theApplication() are Not Working In Browser Script In Siebel 8.1.1.11 (SIA)

SOLUTION

Engineering Team is currently working on fixing these issues. In the mean while you can use the below work around.

The work around requires changing a standard .js file from the Siebel Client framework.

Files to be modified: $siebsrvr_location$\webmaster\siebel_build\scripts\applicationshadow.js

Steps to apply the fix

 1. Replace the function theApplication() implementation in applicationshadow.js with the below change.

Existing implementation of the function theApplication()
function theApplication ()

{

   if ( App() == null )

       return null;

    

   if(SiebelAppFacade != undefined && SiebelAppFacade.InterfaceSI != undefined && SiebelAppFacade.InterfaceSI.App != undefined)

       return App().GetShadow();

   else

       return App().shadow;

 

}



Implementation with Fix

function theApplication ()

{

   if ( App() == null )

       return null;

    

   if (IsOpenUI())

       return App().GetShadow();

   else

       return App().shadow;

 

}

2. Replace the function SWEAlert () implementation in applicationshadow.js with the below change

Existing implementation of the function SWEAlert ()

function JSSApplicationShadow_SWEAlert (text)

{

   if (typeof (top._swescript) != "undefined")

   {

      top._swescript.SWEAlert (text);

   }

}


Implementation with Fix

function JSSApplicationShadow_SWEAlert (text)

{

   if (IsOpenUI())

   {

     window.SWEAlert (text);

   }

   else if (typeof (top._swescript) != "undefined")

   {

      top._swescript.SWEAlert (text);

   }

}


3. Replace the function JSSApplicationShadow () implementation in applicationshadow.js with the below change
Existing implementation of the function JSSApplicationShadow()
function JSSApplicationShadow (application)
{
   if (application != null)
   {
      this._application = application;
      application.shadow = this;
      this._application.SeblTrace(2,"JSSApplicationShadow Initialized");
   }
  
   if(!IsOpenUI())
   {
        this.swescriptFrame = top._swescript;

   }
}

Implementation with Fix
function JSSApplicationShadow (application)
{
   if (application != null)
   {
      this._application = application;
      application.shadow = this;
      this._application.SeblTrace(2,"JSSApplicationShadow Initialized");
   }
   if (IsOpenUI())
   {
      this.swescriptFrame = window;
   }
   else
   {
      this.swescriptFrame = top._swescript;
   }
}
4. Restart the web server after applying the fix

5. Clear the Browser cache and test.

for more info

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=247346837178836&id=1604411.1&displayIndex=3&_afrWindowMode=0&_adf.ctrl-state=89vqlzbd_61

8.1.1.11 Installation Fails when attempting to create a backup of the current Installation

8.1.1.11 Installation Fails when attempting to create a backup of the current Installation

Oracle provide a solution for this issue

In the installation location ...\Siebel_Enterprise_Server\Disk1\install there is a file named oneclick.properties

Open it into an editor and locate the line

BACKUP_FOLDER=

Please specify the location where the backup should be taken.

The backup will be made to

$BACKUP_FOLDER\$SIEBEL_ROOT

e.g In Siebel is installed in /sblqa, and the BACKUP_FOLDER=/temp/backup, then the backup will be made to /temp/backup/sblqa

The installer then needs to copy the contents of the existing installation to backup location specified above and then try to delete the contents of existing installation directory.

Modify the backup command line to do a copy instead of a move command:

e.g.

#UNIX_BACKUP_CMD will be used in case BACKUP_FOLDER parameter has a non empty value. Do not change %SOURCE_ORACLE_HOME_LOCATION% and %BACKUP_LOCATION% in command

UNIX_BACKUP_CMD=cp -r ORACLE_HOME_LOCATION BACKUP_LOCATION&&rm -rf ORACLE_HOME_LOCATION/*

Save the file and rerun the install.

Monday, 16 December 2013

Query Issue in Siebel Open UI 8.1.1.11

There is an issue with Siebel open UI 8.1.1.1 . When you query a record, OpenUI displays records. But you cannot drill-down or edit that record, even though you have all privileges.

steps to reproduce.
got to any list applet, Click on query, Press "Enter" try to drill-down. This drill-down works only if that record is current record.
or
Try to navigate by clicking next record, you cannot, you have to use next/previous button

Temporary Solution:
Instead of pressing enter click on "Go" Button.




Thursday, 12 December 2013

Custom File Upload Applet Based On Class CSSSWEFRImpExp / CSSSWEFRImpExp Fails

We have an Import Button in an Applet, on clicking that button, a small popup applets comes and we can upload CSV which is to be imported in to parent applet. This functionality works well in HI mode. But this functionality fails in OpenUI.
Oracle support says this issues addressed in 8.1.1.11, but still I am getting error.

We can Implement this feature with some tricks.

lets create a button on applet and give method name as "FilePopup". And make sure that CanInvoke is true for this method.



function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
{
    if(MethodName == "FilePopup")
    {
            CanInvoke="TRUE";
            return (CancelOperation);
    }
    return (ContinueOperation);
} 

Now open Applet Browser script. 


function Applet_PreInvokeMethod (name, inputPropSet)
{
    switch(name)
    {
        case "FilePopup":
        var ShowModalOptions= "dialogHeight:150px;dialogLeft:100px;dialogWidth:350px;scrollbars:no";
        var intRet = theApplication().ShowModalDialog ("FileImport.htm", "", ShowModalOptions);
       
        var Bc = this.BusComp();
        var csvval=intRet.split("|");
       
        for(var j=0;j<csvval.length-1;j++){
            this.InvokeMethod("NewRecord");
            var csvvalue=csvval[j].split(",");
            Bc.SetFieldValue("First Name",csvvalue[0]);
            Bc.SetFieldValue("Last Name",csvvalue[1]);
            Bc.SetFieldValue("Age",csvvalue[2]);
            Bc.SetFieldValue("Sex",csvvalue[3]);
        }

        return ("CancelOperation");
        break;

        default:
        return ("ContinueOperation");
        break;
    }
    return ("ContinueOperation");
}


Next step is creating an HTML file. Copy the below code and save it as  "FileImport.htm"
in Webserver as well as siebel server. ( \Client\PUBLIC\ and \siebsrvr\WEBMASTER\ )

<html>
</head>
<script language="javascript" src="23030/scripts/3rdParty/jquery.js"></script>
<script>
$(document).ready(function(){

$("#filename").change(function(e) {
var ext = $("#filename").val().split(".").pop().toLowerCase();

if($.inArray(ext, ["csv"]) == -1) {
alert('Upload CSV');
return false;
}

if (e.target.files != undefined) {
var reader = new FileReader();
reader.onload = function(e) {
var csvval=e.target.result.split("\n");
var inputrad="";
for(var j=1;j<csvval.length-1;j++){
    var csvvalue=csvval[j].split(",");
    for(var i=0;i<csvvalue.length;i++)
    {
    var temp=csvvalue[i];
    if(inputrad==""){
         inputrad=temp+"";
    }else if(i!==0){
         inputrad=inputrad+","+temp+"";
    }else{
        inputrad=inputrad+""+temp;
    }
   
   
    }
    inputrad =inputrad+"|";
}

window.returnValue = inputrad;
return inputrad;
};
reader.readAsText(e.target.files.item(0));

}


});
$("#import").click(function(){
    self.close();
});
})
</script>
</head>
<body>
<input type="file" name="filename" id="filename">
    <div id="csvimporthint_1">
        <table border="1" id="csvimporthint">
        </table>
    </div>
<input type="button" id="import" value="import">

</body>
</html>

compile applet and run GenB script.
Click on Import button and test this functionality.