Friday, October 28, 2016

Forcefully Unlock Siebel Objects

If you want to unlock any Siebel object locked in Sample/Local DB by any other user. Don't be depressed. Just follow these steps and you will get pleasure.

Go to siebel bin folder and search "dbisqlc.exe". Just open this fine and select Database file. Go to Login Tab and enter credentials and click on OK.

      

After successful connection to db, you will get SQL editor. Just copy and paste below SQL command by updating object name and table to be unlocked.

select t.row_id, t.name, t.obj_locked_flg,t.locked_flg,t.locked_date,t.locked_by, t.locked_langfrom s_project twhere name ='Object Name'

Just update the object locks flag or lock flag, and your object is free again, 
Most used objects tables:- 
a. S_TABLE
b. S_BUSCOMP
c. S_BUSOBJ
d. S_APPLET
e. S_VIEW
f. S_SCREEN
g. S_SERVICE
h. S_PROJECT
i. S_REPORT
j. S_PICKLIST
k. S_LINK

Custom Lookup Function


Solution: Write a LookupDesc function in the application object. Just edit Application that is being used by your object manager. Create a new function called 'LookupDesc' and paste this code:

function LookupDesc(Type, Value)
{
try {
var sDesc = "";
var boLOV = TheApplication().GetBusObject("List Of Values");
var bcLOV = boLOV.GetBusComp("List Of Values");
with (bcLOV) {
ClearToQuery();
SetViewMode(AllView);
ActivateField("Description");
SetSearchExpr("[Type]='" + Type + "' AND [Value] = '" + Value + "'");
ExecuteQuery(ForwardOnly);
if (FirstRecord()) sDesc = GetFieldValue("Description");
} //with
return(sDesc);
}
catch(e) {
throw(e);
}
finally {
bcLOV = null;
boLOV = null;
}
}

Now, invoking the above function is by using a single line in applet, bc or a business service -

TheApplication().LookupDesc("MY_TYPE", "My Value");

Bulk Upload on Button Click


Server Script on Applet to upload excel sheet:-
function WebApplet_PreInvokeMethod (MethodName)
{
if (MethodName == "UploadFile")
{
var i =2;
var ExcelApp = COMCreateObject("Excel.Application");
ExcelApp.Workbooks.Open("D:\\UploadFile.xlsx");
ExcelApp.Visible = false;
var oBOLdVal = TheApplication().GetBusObject("Service Request");
var oBCLdVal = oBOLdVal.GetBusComp("Service Request");

while(ExcelApp.ActiveSheet.Cells(i,1).Value!= 'undefined')
{
var Type = ExcelApp.ActiveSheet.Cells(i,1).Value;
var SubType = ExcelApp.ActiveSheet.Cells(i,2).Value;
var Description = ExcelApp.ActiveSheet.Cells(i,3).Value;
var Status = ExcelApp.ActiveSheet.Cells(i,4).Value;
//var Product = ExcelApp.ActiveSheet.Cells(i,5).Value; //You can define more cell here

with(oBCLdVal)
{
ActivateField("Service Request Type");
ActivateField("Lot Number");
ActivateField("Description");
ActivateField("Status");

ClearToQuery();
//ExecuteQuery();
InvokeMethod("SetAdminMode","TRUE");
NewRecord(NewAfter);
SetFieldValue("Service Request Type",Type);
SetFieldValue("Lot Number",SubType);
SetFieldValue("Description",Description);
SetFieldValue("Status",Status);
WriteRecord();

}
i=i+1;
}
ExcelApp.Quit();
ExcelApp = null;
oBOLdVal = null;
oBCLdVal = null;
TheApplication().RaiseErrorText("Load Success");
return(CancelOperation);
}
return(ContinueOperation);


Authentication Problem From Siebel Open Ui to LDAP Server

Siebel CRM
8.1.1.11.11 [IP2013]
Oracle Solaris on SPARC (64-bit)

For Conflict Check
ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1
Patch location = /u01/app/oracle/product/11.2.0/client_1
opatch lsinventory
opatch prereq CheckConflictAgainstOHWithDetail -ph ./16852128
opatch apply 16852128

Note: SWSE Profile on Linux
http://download.oracle.com/technology/obe/demos/siebel/Linux/07_SWSE/07_swse_viewlet_swf.html


Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:

        $ cd <PATCH_TOP_DIR>/16852128

        $ opatch apply

2.      Verify whether the patch has been successfully installed by running the following command:

        $ opatch lsinventory

3.      Start the services from the Oracle home.



Deinstallation
----------------------
Ensure to follow the Prerequsites (Section I). To deinstall the patch, follow these steps:

1.      Deinstall the patch by running the following command:

        $ opatch rollback -id 16852128
 
2.      Start the services from the Oracle home.

3.      Ensure that you verify the Oracle Inventory and compare the output with the one run before the patch installation and re-apply any patches that were rolled back as part of this patch apply. To verify the inventory, run the following command:

        $ opatch lsinventory

(IV) Bugs Fixed by This Patch
---------------------------------
The following are the bugs fixed by this patch:


16852128 - 11.2.0.4: (OCI) CRASHES WITH SIEBEL WHEN LDAP AUTH ENABLED ON SOLARIS