Wednesday, 21 October 2020

Disabling Copy Paste in Siebel Fields - List applets

 Hello All, 

In my previous post ,

i explained how can we disable any UI feature like Copy, Paste, Cut on a field. The limitation of the previous post was that the code works for only form applets, as for list applets we do not have a unique selector (we have multiple columns and we cannot get a unique identifier)

So we can use the Like (*) selector of JQUERY framework, and can extend the functionality for list applets too,


here the Id of first record is 2_s_1_l_Contact_Last_Name, for 2nd it will be 2_s_2_l_Contact_Last_Name ,, likewise for subsequent records.

We can use the * operator and pass the common parameter, 'Contact_Last_Name' in this case, and it will apply to all records in list applet

$( "td[id*='Contact_Last_Name']").bind('copy paste cut',function(e) {


alert('cut,copy & paste options are disabled on this Field!!');


Monday, 28 September 2020

Extracting Multiple Nodes from Hierarchy - Working with XSL Transformation

 Hello All, 

Recently i was working on a integration where i was getting multiple errors in case of failures.

I was first planning to use FINS Industry XML service for the Error property extraction or Workflow Utility Echo, but these business services have limitations that they can only get one Node/Process Property from the hierarchy. i.e. return the first matching node in case multiple child are present at same level .

In the below XML if we try getting the Value of Error Code, using any Siebel provide vanilla business service ,we will only get "ErrorCode:500" and not the other nodes.

so, to get multiple Node we need to write custom Business Service that traverses the Hierarchy and do looing, that can be a bit confusing and requires multiple looping.


here, SiebelMessage.GetChild(0) is the IO instance

SiebelMessage.GetChild(0).GetChild(0) is the IC Instance

SiebelMessage.GetChild(0).GetChild(0).GetProperty("ErrorCode") is the location of process property we need to extract

XSL to the Rescue :-)

Well not a traditional approach, but yes we can use XSL for the multiple Node extraction, and that too without writing a custom BS. The code is pretty simple and can get to any level of hierarchy.

Below code Searches for ErrorCode and ErrorMessage under XMLResult/ErrorDetails path and uses for-each loop to iterate and get the values 

the final Result looks like, 

ErrorCode: 5002 ErrorMessage: The JSON value could not be converted to System 

ErrorCode: 5003 ErrorMessage: The Total value cannot be Negative. 

ErrorCode:5004 ErrorMessage: The Taxes must be passed in Input

I will share more details on how to use this in workflow in my next post, till then happy exploring

Sunday, 27 September 2020

Siebel Integration: Search Spec in Data Maps

 Hello All, 

Recently i had a requirement where i had to pass some data over Outbound web service. There was a challenge that required me to pass data of a particular type only from the input data. i.e. The master data has Orders of Type A and Type B and i had to send only Type A Orders.

To achieve this there are multiple way but the best possible i found was Data Map SeachSpec.

This is very simple yet powerful approach for filtering the records.

Sample Data Map:

We need to put the Expression in Source Search Spec and the filtration will be done .
We can pass Expression like [Field] IS NULL, [Field]="TypeA", [Field]>Created etc.

Try and share your experiences.

Disabling Copy Paste in Siebel Fields

 Hello All, 

Recently i had a requirement where i had to Disable Copy Paste on a particular field, to force user to Open Pick Applet rather then directly entering the value for some performance issues.

This is very simple to achieve if we use Open UI, and below piece of code can be used for the purpose.

$('[aria-label="Account"]').bind('copy paste cut',function(e) {


alert('cut,copy & paste options are disabled on this Field!!');


Error Popup:

Sample PR File:

Hope this was helpful.

to extend this to List applet please follow the Post

Friday, 24 July 2020

Exposing Siebel API as Auto Search

Hello All,

I have posted multiple article on Siebel Auto Suggestion, where we get the Suggested results based on the keyword typed.

In this post i will share how we can expose Siebel REST API url to be used as Auto Suggestion result fetching.

below Video shows, where a Front End User is entering some Product Name and Siebel API sends the request to Siebel and displays the Siebel Products results.

Siebel Structure:

The Rest API of Siebel has the features where a search expression can be set and we can return a particular field or set of field.

https://<<hosturl>>/siebel/v1.0/data/Internal Product/Internal Product/?searchspec=([Name] LIKE '"+a+"*')&fields=Name", false);  // `false` makes the request synchronous

here, a is the value that will be entered in text box and passed to Siebel REST API url.

Pretty Simple :-), yet effective

Sample HTML Form
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src=""></script>
  <script src=""></script>
<body  style="background: beige;">
<div class="container">
<div id="emailcontainer">
<label>Search  a product here by entering the keywords</label>
<label for="emailaddress">Product Name</label>
<input type="" class="dataholder ui-autocomplete-input" id="emailaddress" name="emailaddress" placeholder="Email Address.." autocomplete="off">
  source: function( rqst, response ) {
       var txt='',tags='';
       var request = new XMLHttpRequest();
var a = $('#emailaddress').val();'GET', "https://<<youraddresshere>>/siebel/v1.0/data/Internal Product/Internal Product/?searchspec=([Name] LIKE '"+a+"*')&fields=Name", false);  // `false` makes the request synchronous

if (request.status === 200) {

var obj = JSON.parse(request.responseText);
var Items = obj.items;
var length = Items.length;
a = new Array();
for (var i=0;i<length;i++) {
 a[i]= Items[i]['Name'];

tags = a;
            var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( rqst.term ), "i" );
            response( $.grep( tags, function( item ){
            return matcher.test( item );
          }) );

This can also be implemented in Siebel UI as well, will share the details of that in upcoming posts. 

Tuesday, 19 May 2020

Attaching Multiple PR Files in a Applet : Siebel Open UI

Hello All,

This article explains how to tag multiple PR file with a single applet, by design we cannot tag multiple PR file to a Applet, this is Siebel Open UI Limitation.

Then how can we still tag multiple PR ??,  well this is very basic yet difficult to get in first try.

The Crux of the solution lies in Dependencies, i.e. the PR files usually extend their function and behavior from JQGridRenderer or PHYRenderer as shown in below files ,

So we have to pass our 2nd PR File name here in Place of JQGridRenderer in 1st PR File, and 2nd PR file will have the normal syntax.


Will have PR2 as its dependency, so when PR1 is Loaded it will automatically Load PR2.


Will have normal structure of extending JQGridRenderer.

Now we need to make entries for Both PR files in Manifest Files, and tag only PR1 with the Applet in Manifest Administration and it will do the work.

Oracle Doc mentioning the issue and suggested Solution

Try this and let me know in case of any issues.

Monday, 11 May 2020

MVG in Siebel : Association and Disassociation

Hello All,

This post is in continuation of my previous post , Association and Disassociation in MVG applet.

So if the case arise wherein we have to write script of parent BC not the MVG BC. i.e. a case where Order is parent and Voucher is MVG BC, we have to write script on Order.

For Association of Records

The Steps are very simple.

1. Instantiate the Current BC (Order in this case)
2. Get MVG Bus comp from the field on which MVG is based
3. Get Assoc Bus comp from the MVG Bus Comp
4. Specify the search on the Assoc Bus comp
5. Trigger Associate Event

//Add Record in MVG -- Initiate BC - Get MVG BC from Field - Get Assoc BC - Fire Search Spec and Associate

var oNumber = "1-12345TXN";
var oBusObject = TheApplication().ActiveBusObject();
var oBusComp = oBusObject.GetBusComp("Order Entry - Orders");
ActivateField("Voucher Number");
SetSearchSpec("Order Number",oNumber);
var oMVGBuscomp = GetMVGBusComp("Voucher Number");
var oAssocBusComp = oMVGBuscomp.GetAssocBusComp();
ActivateField("Order Number");
ActivateField("Voucher Expiry Date");
var expr = "[Order Number] = '"+oNumber+"' AND [Voucher Expiry Date] >= Today()";
var isRec = FirstRecord();
while(isRec != "")
isRec = NextRecord();

In case of deleting record from MVG 

The Steps are very simple.

1. Instantiate the Current BC (Order in this case)
2. Get MVG Bus comp from the field on which MVG is based
3. Specify the search and till no records left
5. Delete record

////Delete from MVG -- Initiate BC - Get MVG BC from Field  - Delete Record from MVG
var oNumber = "1-12345TXN";
var oBusObject = TheApplication().ActiveBusObject();
var oBusComp = oBusObject.GetBusComp("Order Entry - Orders");
ActivateField("Voucher Number");
SetSearchSpec("Order Number",oNumber);
var oMVGBuscomp = GetMVGBusComp("Voucher Number");
var rec = FirstRecord();
while (rec)
rec = FirstRecord();

Here in this case we delete record from MVG Bus comp instance.

Tuesday, 5 May 2020

Record Association and Disassociation in Siebel : MVG Applets

Hello All,

We have many time worked wth MVG Applets, where 2 Applets opens in Form of Shuttle applet.
The one of left is Associate applet and Right is MVG Applet.

When we Move record from Assoc to MVG is called Association, and Removing/Deleting from MVG is called Disassociation.

Recently i had a requirement wherein i had to perform Association, and update some field in Asso BC to keep some check
i.e. Suppose we are associating a custom entity "Vouchers" with a Account, and once we associate the Voucher we want to update a field in Voucher say Account Name, so that it does not appear again in Assoc list to prevent it from multiple tagging

and the same way we wanted to Nullify the Field, Account Name on the Voucher when Disassociation happen.

Choosing the Events:

Association triggers Associate Event of Corresponding Business Component, so update a field value of assoc BC when Association happen we will have to write script in Associate Event.

function BusComp_Associate ()
var AccNum = this.ParentBusComp().GetFieldValue("CSN Number");//to get the field in corresponging parent BC
ActivateField("Account Number"); 
SetFieldValue("Account Number", AccNum);       


There is no such event Disassociate in siebel, rather DeleteRecord is triggered when Disassociation occurs, so to remove the field value we can use Delete event.
I am using preDelete event, to make my code run before the record is deleted.

function BusComp_PreDeleteRecord ()
ActivateField("Account Number"); 
SetFieldValue("Account Number", ""); 
return (ContinueOperation);

we will explore how to associate/disassociate from different BC, in our next post

Monday, 4 May 2020

Navigation One Record at a time in Siebel IP17/18 : Part 2

Hello All,

In my previous post we modified the navigation behavior of Siebel IP 17 to navigate single record at a time,
but there was one miss with this, pointed by one of the reader. The Icons for navigation were always highlighted i.e. irrespective of being on last record next record icon was highlighted.

so to achieve this i have made some change ,

The logic is , we need to disable or enable button based on CanInvoke result of Methods, below code does the trick ,

function disableIcons ()
if ( pm.ExecuteMethod("CanInvokeMethod", "GotoNext") == false) {
$("#" + appletFullId).find($('.ui-icon-seek-next')).addClass('ui-state-disabled');
else {
$("#" + appletFullId).find($('.ui-icon-seek-next')).removeClass('ui-state-disabled');
if (pm.ExecuteMethod("CanInvokeMethod", "GotoPrevious") == false) {
$("#" + appletFullId).find($('.ui-icon-seek-prev')).addClass('ui-state-disabled');
else {
var a = pm.ExecuteMethod("CanInvokeMethod", "GotoPrevious");
$("#" + appletFullId).find($('.ui-icon-seek-prev')).removeClass('ui-state-disabled');
if (pm.ExecuteMethod("CanInvokeMethod", "GotoPreviousSet")== false) {
$("#" + appletFullId).find($('.ui-icon-seek-first')).addClass('ui-state-disabled');
else {
$("#" + appletFullId).find($('.ui-icon-seek-first')).removeClass('ui-state-disabled');
if (pm.ExecuteMethod("CanInvokeMethod", "GotoNextSet")== false) {
$("#" + appletFullId).find($('.ui-icon-seek-end')).addClass('ui-state-disabled');
$("#" + appletFullId).find($('.ui-icon-seek-end')).removeClass('ui-state-disabled');

and the updated PR file can be Taken from the Drive link.

Sunday, 3 May 2020

Improving Siebel Dashboard Part 2: Using Siebel Open UI

Hello All,

Siebel has a very obsolete Homepage/Dashboard with outdated Calendars and Applets appearing on Homepage,  so is there a way we can improve siebel dashboard to make it par with the latest products available ?

Well yes, we can achieve this using the Open UI Framework and can include Charts, Graphs , Timeline etc to give it a rich and modern look.

The Code to get this Done, well the code is pretty simple to set the context please go through the W3  School Link, this will give a basic idea of How to use Google charts and then we will only have to pass Siebel data to Chart Object.

Siebel Code, I am writing the sample code in postload.js file for reference, you can write in any Applet or View PR.

if (typeof(SiebelAppFacade.Postload) == "undefined") {
// need to pass the JS file here or in Script tag, either the URL or Make an entry in Manifest file and register it
//define("Postload", [""],
function ()
 SiebelApp.EventManager.addListner("postload", OnPostload, this);
function OnPostload( ){         
//Invoking 3rd party script for charts rendering 
var script = '<script type="text/javascript" src=""></script>';
var a = '<div id="piechart"></div>'; $('#_sweclient').append(a);
google.charts.load('current', {'packages':['corechart']});
// Draw the chart and set the chart values , need to pass values from Siebel i am using the value from W3 School as example 
function drawChart() {
  var data = google.visualization.arrayToDataTable([
  ['Task', 'Hours per Day'],
  ['Work', 8],
  ['Eat', 2],
  ['TV', 4],
  ['Gym', 2],
  ['Sleep', 8]
  // Optional; add a title and set the width and height of the chart
  var options = {'title':'My Average Day', 'width':550, 'height':400};
  // Display the chart inside the <div> element with id="piechart"
  var chart = new google.visualization.PieChart(document.getElementById("piechart"));
  chart.draw(data, options);}


For more information of Charts available please refer,

Friday, 17 April 2020

Creating a Attachment Record in Siebel

Hello All,

Recently i had a requirement wherein ,
  •  I had to Create Generate a BIP report
  •  Attach BIP on a Particular Order
  •  Send the Attached BIP to external System

Taking the 2nd part, Attaching BIP to a Order, or Simply Creating a attachment record in Order.

This can be achieved very Easily with ,

Business Service Name: FINS Industry BC Facility Service
Busienss Service Method: CreateFile

but, FINS Industry BC Facility Service can create attachments and attach in Related attachment BC but user has to be in current context of Application i.e. The process need to be initiated from Siebel application by user.
For any process that is called via a web service this BS won't work

So to create attachment, we have to use CreateFile method of the corresponding Attachment BC.
Below code can be used,

var OrderBO = TheApplication().GetBusObject("Order Entry"); 
var OrderAttachBC = OrderBO.GetBusComp("Order Entry Attachment"); 
var AttachmentName = "Attachment";//Name of Attachment 
var OrderId = Inputs.GetProperty("RecordId"); //RowId of Order 
var sAbsoluteFileName = Inputs.GetProperty("FilePath");//Path of file that will be added as attachment 

NewRecord(NewAfter); SetFieldValue("OrderFileName", AttachmentName ); 
SetFieldValue("Order Id",OrderId); SetFieldValue("OrderFileDeferFlg", "R"); SetFieldValue("OrderFileDockReqFlg", "N"); 
SetFieldValue("OrderFileDockStatFlg", "E"); 
SetFieldValue("OrderFileSrcType", "FILE"); 
SetFieldValue("OrderFileExt", "PDF"); 

var sGetFileReturn = InvokeMethod("CreateFile", sAbsoluteFileName, "OrderFileName", "Y"); WriteRecord(); 

Hope this was helpful.

Working With Attachments in Siebel IO's

Hello All,

Recently I had a requirement wherein, i was required to share the attachment with Order over WebService.

This seems a bit tricky, but siebel has made it Possible via the IO based structure. We have to use IO that has the attachment IC and when we retrieve the Hierarchy of the IO, we can see the output of attachment IC and it is in MIME format encode with BASE64 encoding.

Now the target system has to read the file buffer and decode using any online Decoder or write a custom decoder.

Sample Structure looks like ,

More details can be found in bookshelf link ,

Siebel Data Maps : Making Integration Easy

Hello All,

let us explore the Use of Integration Data Maps in this Post.

Integration data maps make it possible to map two IO's i.e. enables to pass fields value from one IO to other, irrespective of the level of Hierarchy.

Recently I had a requirement wherein i had to Update Users Opt In Preference for Receiving Emails and capture date of this activity, also there were multiple contacts with same mobile numbers.

This can be achieved Via multiple ways .

1. From the view of a Developer relatively new to Siebel , 

  • Create a BS 
  • Search for the contact with the given Input
  • Loop through it, and Update the records

2. From the view of a Senior Developer,

  • Create a Workflow 
  • Search for Record using Siebel Operation, Find Record 
  • Use Looping via Next Record Method
  • Update the Record

3. From the view of Siebel Integration Developer

  • Create a Workflow
  • Create a IO/Use Existing IO based on Contact
  • Search Using EAI Siebel Adapter
  • Use Data map with Same Source and Destination IO, and Provide the value in Destination IO
  • Get the Output of Data Mapping , and Upset using EAI Siebel Adapter 

I used the 3rd Approach and sample Workflow Looked like,

To call data map we need to Use

BS: EAI Data Transformation
Method: Execute

Map Name: Name of Data Map
SiebelMessage: The Hierarchy from EAI Siebel Adapter

if we need to pass any Values from Workflow like Process Properties or Literal Values to Data Map we can pass these by Defing those in Input
and can be used in Data Map with and & symbol i.e. [&ProcessPropertyName]

Sunday, 26 January 2020

Working with XML Document in Siebel CRM -- Use of REST

Hello All,

Recently i had a requirement wherein I had to insert some records in siebel with input as XML Document and all this was to be done over REST web service.

There are 2 parts to this
  1. Inserting record from XML Document
  2. Expose the Business Service over REST (available only IP 16+)

Part 1, can be divided in further sub-parts 

  •  Get XML Doc as Input and Convert XML Hierarchy to Siebel IO Hierarchy
   BS: EAI XML Converter
   Method: XMLDocToIntObjHier
   Input: XML Documment (containg our target records, the type of Process property should be String)

  • Pass the Hierarchy (output) from previous step as input in EAI Siebel Adapter

    BS: EAI Siebel Adapter
    Method: Upsert
    Input: Hierarchy (Output of previous step)

Part 2, to expose a BS as REST web service (inbound) follow the below steps

  • Make entry for the Business Service in Administration - Application --> Business Service Access
  • In the Access By Responsibilty section add the Responsibilty that needs to have access to this BS

Now you may think what different have we done in the above step, we created workflow as usual, so where is REST part??

Well siebel after IP 16, has a new architecture for REST, which can be explained as

1. Expose data using BO and BC Architecture (IO/IC)

Here the keyword /data/ specify the use of BO/BC architecture , i.e the above line translates to "search for Account Record with Id 88-4XVPD in Account BC and Account BO"

2. Expose data using Business Service Architecture
http://ServerName:port/siebel-rest/v1.0/service/Siebel Account/QueryByExample

Here the keyword /service/ specify the use of Business Service architecture , i.e the above line translates to "Execute the QueryByExample of Business Service Siebel Account"

Note* this is just a high level detail , there are various other considerations like Methods (POST, GET, PUT) Headers, Body that need to be passed , will cover those in separate post
for a better understanding refer bookshelf

Since we have to expose the Process Over REST, lets try to do this.

1. Following the generic Siebel Rest Architecture for Exposing Business Service over REST, we will use the URL:

URLhttps://hostname/siebel/v1.0/service/REST Test Service/ContactUpsert

Method: POST (BS uses post method to execute a action )

"XML":"<?xml version='1.0' encoding='UTF-16'?><SiebelMessage  MessageId='1-1LYUKZH'  MessageType='Integration Object'  IntObjectName='Contact Integration Object'  IntObjectFormat='Siebel Hierarchical' ><ListOfContactIntegrationObject><Contact><Id>1-1122121</Id><FirstName>Sheename</FirstName> <LastName>Rawal</LastName><EmailAddress></EmailAddress></Contact><Contact><Id>1-1122122</Id><FirstName>Sajan</FirstName><LastName>kumar</LastName><EmailAddress></EmailAddress></Contact></ListOfContactIntegrationObject></SiebelMessage>"

Here in "body", we have the input process property "XML" that will accept XML string as input. (this is standard input way to be used in REST URL calls)

*Sample output on postman tools for testing the BS

Now we have the Workflow ready, let us write a simple BS to accept XML document as input and expose it over REST.

Client BS to call workflow :

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
/*var XML = "<?xml version='1.0' encoding='UTF-16'?><SiebelMessage  MessageId='1-1LYUKZH'  MessageType='Integration Object'  IntObjectName='Contact Integration Object'  IntObjectFormat='Siebel Hierarchical' ><ListOfContactIntegrationObject><Contact><Id>1-1122121</Id><FirstName>Sharma</FirstName> <LastName>Sharma</LastName><EmailAddress></EmailAddress></Contact></ListOfContactIntegrationObject></SiebelMessage>";*/

var XML = Inputs.GetProperty('XML');

var sSvc = TheApplication().GetService('Workflow Process Manager');

var sInputs = TheApplication().NewPropertySet();

var sOutputs = TheApplication().NewPropertySet();

sInputs.SetProperty('XML Doc',XML);

sInputs.SetProperty('ProcessName','HHML XML Doc to Hierarchy');

sSvc.InvokeMethod('RunProcess', sInputs, sOutputs);


return (CancelOperation);

sample Input XML:

<?xml version='1.0' encoding='UTF-16'?>
<SiebelMessage  MessageId='1-1LYUKZH'  MessageType='Integration Object'  IntObjectName='Contact Integration Object'  IntObjectFormat='Siebel Hierarchical' >

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...