Siebel OpenUI Enhancement: Recent Record Plugin

Its a common question asked these days.. Can Siebel OpenUI save Siebel from dying..?

Well, only Innovation can save SIEBEL. And Siebel OpenUI is the tool with which we can innovate our applications and be in this dynamic world.

Good news is few good people from Siebel, are doing very good stuffs with OpenUI. You need not to trust me, just go to Youtube and search for “Siebel OpenUI”.
You will find many good customization examples and innovations done with OpenUI.

Siebel OpenUI is all about helping Siebel.. That is possible only if your enhancement helps in reducing operation time or we can say reducing number of clicks to achieve a target.

This example is one of those enhancements..

Access all Recent Records on application Home Page and on a single click

What do you mean by Recent Records feature in Siebel ?

Its a very useful feature, last 5 modfied records displayed on each screen home page. Its useful because Service Request Agent need not to go to SR list view to find his last record instead he can see his records on SR home page only. As displayed in below image:

Recent Records on Contact Home Page

Recent Records on Contact Home Page

What is the new enhancement?

Enhancement is to make available Recent Records from all Screens on application home page. And that too on a single click. This is how it looks like..

Recent Record Popup on Home Page

Recent Record Popup on Home Page

Contact Recent Records on Home Page

Contact Recent Records on Home Page

Is this customizable ?

Yes, we can customize this plugin as per our requirements.

– We can set Screens as per our choice, for Recent Records logging.

– We can set fields to displayed, for Recent Records logging.

How this plugin is working ?

Using a application level JS file which called on Postload event, on each page load.

  • Add custom button and display custom html in popup
//html for custom button
var id2 = 'siebui-cust-btn'; 
var RecentRecord = "<button " + 
"id= '" + id2 + "' " + 
"class= 'appletButton' " + 
"aria-label=RecentRecord " + 
"type=\"button\" " + 
"data-display=\"RecentRecord\" " + 
"title=RecentRecord " + ">" + "RecentRecord" + "</button>";
//append button code in top header
if($(document).find("#"+id2).length == 0)
$("#SiebToolbar_OpenUIReports_40").after(RecentRecord);

Create your custom HTML and Initiate Colorbox to open Popup on button click. (Colorbox is a jQuery plugin)

$.colorbox({html:markup,width:"35%",height:"600px","z-index":"9000",opacity:0});

 

  • Bind click on custom button
//define click event on button id
$(document).on("click","#siebui-cust-btn",function(event) {
event.stopImmediatePropagation();
//code goes here..
)}

 

  • Bind “FieldChange” event of Presentation Model

Bind your code on “FieldChange” to capture any field change.

//bind this block with PM fieldchange event
pm.AttachPMBinding("FieldChange", function(control,value) {
//code goes here
)}

 

  • Store changed records in Web Storage

We need to store changed fields some where, so that it can be displayed again after logoff/login. We are not storing in Siebel database here.
Then where ?? Storing in Web Storage, find more here..

//store global object in browser localStorage so that its available even after tab change/logout/browser close
localStorage.setItem("RecentRecords","data to store");

Challenges:-

We all know that “FieldChange” event can only be captured by using Presentation Model instance. And PM instance can only be called on applet/view level.
But of course we can’t write PM/PR files for all applets which we want to trace.

Solution:-

To resolve this, I took PM instance from Siebel App object. On each page load, it calls active applet and fetch its PM instance.

var pm = SiebelApp.S_App.GetActiveView().GetActiveApplet().GetPModel();

 

How to download this plugin?

Click on below link to download, else share your mail id below in comment section.

Siebel RecentRecords Plugin Files

You can watch full video here..

[su_youtube_advanced url=”https://www.youtube.com/watch?v=NWayp47Z6I4″ controls=”alt” autohide=”yes”]

Here is the Read me file from the plugin..

[su_document url=”http://www.askmesiebel.com/wp-content/uploads/2016/10/Read-me1.txt” width=”500″ height=”460″]

[su_divider style=”dotted”]

@skmeSiebel

25 comments for “Siebel OpenUI Enhancement: Recent Record Plugin

Leave a Reply

Your email address will not be published. Required fields are marked *