יום שלישי, 31 ביולי 2012

Explicit Write in Standard Interactivity


Offlately i am working on SI application and being bombarded by lot of user acceptance issues. I am not sure whether God is really happy or its just a clearance sale that most of the time we are able to find the fix. Recently we were being asked to implement explicit write sort of scenario in standard interactivity portal. In the detail applet for service request user didn't want to click Save button to save the record instead it was required as soon as details in the Description are filled record should auto save.

Again browser script comes to party. As browser script on standard events of Applet/BC doesn't work under SI architecture, only control level events are supported. Ever friendly Alex has beautifully explained the browser script architecture in his recent post. So idea here is to explicitly call the click event for "Save" button on the applet for OnChange event of Description column. Fortunately for us most of the fields on the applet were auto populated and read only so this solution is not that performance taxing.

However the key to this solution remains the HTML attribute property of the "Save" button control. As siebel generates its own SWE html ids(like s_1_1_6_0) so it becomes very important we give custom id to this button in order call it in other events. This can be achieved by adding below attributes to the control in tools.

HTML Atttribute: id=WriteRecord 

Once the id is associated with button control, we can easily call below code from OnChange event:

function Edit__0__Control__Description__onchange (applet, id)
{
if(document.getElementById(id).value != "")
{
document.getElementById("WriteRecord").click();
}
}

This approach though has some inherent disadvantages as this can be only used when controls/columns in the Form/list applet are less. Any other approach/idea/comment to achieve explicit write functionality in SI application is always welcome.

Happy Crunching!!





יום חמישי, 12 ביולי 2012

Illusion in Standard Interactivity


Whenever I am asked to work on siebel standard interactivity it feels like harry potter stranded in those wild mazes. But i can tell you if you play in Java/HTML you can really unearth hidden gems in SI application. Recenty while working on Siebel eSales portal we were asked to implement typical requirement to control button's visibility conditionally. 

For the Open status button should be visible on list applet and for other status values it should be hidden. Once again "WebApplet_ShowControl" server event is critical to its implementation as other browser events of applet are not supported in SI architecture. The idea is to modify the HTML generated at run time to achieve conditional visibility. Below steps are required for ultimate illusion.


1 - In the HTML attribute of the Button Control which we want to make conditionally visible add below property
style='visibility:hidden'
By default button will be hidden and we will only make it visible when status is Open.


2 - Below piece of script is required at "WebApplet_ShowControl" event on the server side of applet.
if ((ControlName == "Test") && (Property == "FormattedHtml"))
 {
var a = HTML.indexOf("visibility");
var b = HTML.indexOf("'",a+1);
if ((a > -1) && (b > -1))
{
var sr = this.BusComp().GetFieldValue("Status");
if(sr=="Open")
var t = "visibility:visible'";
else
var t = "visibility:hidden'";

var HTML2 = HTML.substr(0,a) + t + HTML.substr(b+1);
HTML = HTML2; // Re-Generating HTMLs
  }
 }
Here we are just checking the status value and modifying the generated HTML at run time to make button dynamically visible.





If in first attempt it doesn't work don't get mad at me just clear the cache and watch out for magic. Bet me you will feel like wathcing The Prestige again.

Happy Summers!!




יום חמישי, 7 ביוני 2012

User Keys & Blind Insert

If ignorance is bliss, why aren't there more happy developers?


Recently I found something strange in our inbound integration. For Upsert scenario we received XML data in all Upper Case format. Despite having CaseInsensitive setting set to TRUE for EAI Object Manager the integration was failing. It was because of the fact that user keys are always case sensitive irrespective of setting at OM level.

As a workaround for this we can either use "Force Case" field property at BC level or we can have numeric user keys. 

Another interesting user property we came across insert unique-user-key scenario is "SuppressQueryOnInsert" at IC level to do blind insert. This is real performance boost in scenarios when you are sure incoming user keys will always be unique. Without this user property Siebel first generates SELECT statement which queries for the record with given user key across the table. This user property helps in suppressing this SELECT statement and thus improves the performance by some mile.

Happy Integration!!

יום שני, 4 ביוני 2012

How to Create a Parent with Multi Child Tabs on Aggregate Views

As the quote goes, "You cannot NOT have a user experience". User experience is one of the most important things in product design. I personally feel that Siebel's User Interface could be a lot better than what it is (but thanks to the new Innovation pack for 2012, with the Open UI I think Siebel is getting there).

Most users do not like drilling down on a record which then takes them to the detail view of a record and then navigating back to the parent record. What they usually ask for is, if they could have the tabs right on the main view of the screen. Something like this -

 










Some thought this was not possible but actually it is and requires just a web template change for the Aggregate views.

Change the Web Template of the view to either one of the following -

1. View Parent Multi Child With Tabs
2. View Parent List With Tabs

Cheers!

יום חמישי, 31 במאי 2012

Generate Quote using Narrative Reports in CRM On Demand

Hey Guys,

One thing we all think about is how to design a simple solution to a complicated requirement and so today lets see how to create a Narrative report for a 1:M relation. As you may know Narrative Report can be used only on one record. But, using a combination of reports, we can do the a LOT more!

All we need to do is create 2 reports linked to each other and add them to a Dashboard. let me show you how.

Step 1: Create a Opportunity Parent Report

Using Opportunities Subject Area (Reporting  or Real-Time) Add the fields you would like to use on the Opportunity Information Section of the Quote report.














In Step 2: Create Layout, Add a Narrative View and use the this code
Opportunity Parent Narrative View Code. Make sure you use the @"Number" symbol in the right places, or the values would display against the wrong columns.











You'll notice that the values are not correct in this preview, don't worry. since this report is not being filtered from the Prompt yet, the right values do not appear.

Save the report

Step 2:  Create a Opportunity Product Report










Using Opportunity Product Revenues Subject Area (Reporting  or Real-Time) Add the fields you would like to use on the Product List.
Note that I am filtering the contents of this report based on the results of the Opportunity Parent Report.
In Step 2: Create Layout, Add a Table or Pivot Table (Whichever works for you) and a Narrative View and use the this code Opportunity Parent Product Narrative View Code.




















You'll notice that the values are not correct in this preview, don't worry. since this report is not being filtered from the parent yet, the right values do not appear.

OK. Save the Report.

Step 3: Create a Dashboard

Create a New Dashboard and give it a name. In the Design Section add both the above reports.











Save the Dashboard.

Step 4: Create a Web Link (Last Step)

Create a Web Link on  Opportunity and in the URL text area, add the link to your Dashboard you created in Step 3. You can get the URL by Viewing the Source Code

Ex: https://secure-ausomxxxx.crmondemand.com/OnDemand/user/analytics/saw.dll?Dashboard&PortalPath=%2fshared%2fCompany_XXXXX_Shared_Folder%2f_portal%
2fOpportunityQuote+Report&Options=rfd&Action=Navigate&P0=1&P1=eq&P2=Opportunity%2E%22Opportunity%20ID%22&P3=%%%Id%%%

The %%%Id%%% will dynamically change on clicking the Web-Link from your Opportunity Detail Page and display the Opportunity and Opportunity Product Information on your Quote Report


Make sure you test the URL by Adding a Opportunity ID and running the URL in your browser.

After creating the Web-Link, add it onto your Opportunity Layout.


Finally: Let's see how this report works in reality.

Goto any Opportunity that has at least One Product associated











Now click the "Generate Quote" link that you added. You should now see your Opportunity and Opportunity Product Information in a beautifully formatted Quote Report.




















Now, it's time for you to go and impress your customers!

If you have any questions about the post, feel free to add your comments!

Cheers!
Ryan

Automate Siebel EIM Mapping using SQL

Hey Everybody,

Hope you all are doing Great!

It's been a long time since my last post, apologies for that! Anyway, I have decided to make up for that time and give you some great stuff!

Recently, I had a LOT of people asking for a way to Automatically generate EIM Mappings. I have written a post previously called Generate EIM mapping using SQL Script. However I made some new changes that will give you more information than before.

So here are the updated versions for Oracle and MS SQL

Output Preview











Document Links : Do what the document tells you are you're good!

Automate Siebel EIM Mapping using SQL_MSSQL
Automate Siebel EIM Mapping using SQL_Oracle

Watch out for more interesting Stuff!


Cheers!
Ryan


יום שלישי, 22 במאי 2012

Thread Bar Updation


Sometimes Simplicity just does not precede complexity, but follows it. Recently while configuring Thread Bar for some views, we faced a trivial issue. Value of the Thread Field defined was not coming in the Thread bar.  We have specified the correct Thread Applet, Thread Field and Thread Title properties for the related views but only Thread Title was being displayed when we drilldown from List view to Form View. Google resulted this issue being faced by other users without fix.
Things got luckier for me when i found a similar article on support web which stated that this is the intended behavior of siebel when the underlying Business Objects of traversing views are same. However as workaround of this issue there are three options:

  1. Have different BO's for List View and Destination View.
  2. Remove thread bar and make use of IE back option.
  3. If it is business critical to have navigation path in thread bar then one can define Source Field and Destination Field in the drilldown from list View to form view. This setting of source field in the drilldown causes Thread Field to be displayed in the Thread Bar. However it comes with its own inherent issue in a way that user can't traverse through record set in Form view. 
Hope this post helps you while configuring thread bar and keeping business object context in mind. Yup simplicity follows complexity.

Happy Configuration!!