How to enable or disable a button conditionally in Siebel Open UI

Enabling or disabling a button conditionally is pretty common requirement in Siebel configuration. There are many ways to do so, you can choose any of these based upon your requirement but as you know, it is always advisable to get rid of scripting as much as possible.

1) Script in PreCanInvoke Event
2) Named Method
3) EventMethod
4) ‘CanInvokeMethod’: Applet User Property
5) Javascript (only in Siebel Open UI)

1) Script in PreCanInvoke Event
– This is the scripting way to enable or disable a button conditionally in Siebel
– Select the applet, do right click and script in ‘Webapplet_PreCanInvoke’ event
Suppose on Contact List Applet, ‘Create Quote’ button should be enable only when contact status is ‘Active’.
To meet this requirement, we could add script in PreCanInvoke event of Contact List Applet. In script, first check the value of Contact Status field, if it is ‘Active’, then CanInvoke = TRUE else FALSE.

Sample Script:
function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
{
  if ( MethodName == “CreareQuote” )
// Method name
   {
       CanInvoke = “TRUE”;
       return( CancelOperation );      
   }
}
return (ContinueOperation);

2) Named Method
– It is scriptless way to enable a button conditionally
– Can be used in Applet level or BC level
Syntax
   Name: Named Method n: Method Name
   Value: ‘INVOKE’, ‘method name’

3) EventMethod
– Just prefix ‘EventMethod’ with the name of ‘Method Invoked’ (Control level property)
Syntax
   Method Invoked = EventMethodCreareQuote
– No need to script in PreCanInvoke event
– Button will be always active if method name is prefixed with EventMethod, it does not allow to add any condition

4) ‘CanInvokeMethod’: Applet User Property
– Can enable or disable a button conditionally in Siebel
– Applet level user property, supported by Siebel 8.0 or higher version
Syntax
   Name = CanInvokeMethod: CreareQuote
   Value = TRUE

5) Javascript
– This is the new way to enable or disable a button conditionally but applicable only in Sieble Open UI
– Complete repository independent and can be modified anytime as per requirement
– Will be covered in details in Siebel Open UI training articles

Note:
– Avoid scripting in ‘PreCanInvoke’ event as much as possible and use ‘CanInvokeMethod’ user property as an alternative

Need any help!! Please feel free to comment here.
To know more, follow ‘TechOneStop on Facebook / Twitter / LinkedIn / Goolge+. 

DBCHCK utility – check Siebel database health

Siebel comes with many out of box utilities to perform various activities like database health checkup, file system clean up, cfgmerge. DBCHCK utility is one of such utilities that helps to verify current state of Siebel database and it’s health.Siebel DBCHCK Utility

Recently on the last step of Siebel incremental repository merge, we faced an error ‘DATAIMP-ERR-1124: Unable to import table‘ though the merge process was successfully completed. So to find out the reason behind this error, we decided to validate Siebel database and seed data using DBCHCK utility. According to utility, it was the problem with seed data import. We were not interested in fixing seed data related issues, so ignored this but the detail report, generated by DBCHCK was really impressive and elaborated.

You can use this utility to compare physical database schema with repository to make sure that both are in sync. It also validates data integrity including primary keys, foreign keys, list of values. 

Read more about Siebel Incremental Repository Merge – errors that we faced.

Steps to run Siebel DBCHCK utility:

  1. Delete the dictionary cache file (diccache.dat) from the <Siebel Server>\bin directory before running DBCHCK utility. It ensures that the utility validates against the Siebel repository that you have specified. It will create a new diccache.dat file before running integrity check.
  2. Verify that there is no Siebel Remote or EIM operation running on Siebel server
  3. Go to command prompt and use the following command to run the utility
    Prompt>dbchck /S <ODBC_DATASOURCE> /U <USERNAME> /P <PASSWORD> /T <TABLE OWNER> /R <REPOSITORY> /L <LOGFILE> /D <CHECK_AGAINST_DICTIONARY> /A <ALL_TABLES>
    /S ODBC name for database
    /U Username to login to database
    /P User password to login to database
    /T Table owner
    /R Siebel repository name
    /L log file name
    /D Tables against dictionary only
    /A Specify table name or keep it blank to check all tab
  4. Review the log file generated by the utility for any discrepancy. You can ignore certain errors or warnings but there are few discrepancies that must be fixed. To know more about discrepancies generated by this utility, you could read the article ‘Validating the Siebel Schema‘ provided by Oracle.

Note: According to Siebel best practices, we should validate database health every time we upgrade Siebel application or perform repository merge.

Do you have any question? Please feel free to comment below.

Keep in touch, follow TechOneStop on Facebook / Twitter / LinkedIn / Goolge+.

<< Sfscleanup Utility