Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference >

Miscellaneous Methods


This topic describes other methods. It includes the following topics:

GetErrorCode Method

The GetErrorCode method returns a string that contains a numeric error code. For more information, see GetErrorMessage Method.

Format

public int getErrorCode()

No arguments are available.

Used With

Siebel Java Data Bean

Examples

The following example for the Siebel Java Data Bean returns the first record in the Account business component. If an error occurs, then the script displays the error code and error message:

try
{
   //Instantiate the Siebel Java Data Bean
   Sieb_dataBean = new SiebelDataBean();
   String Cstr = "GatewayServer, EntServer, FINSObjMgr";
   Sieb_dataBean.login(Cstr, "SADMIN", "SADMIN");
   SiebelBusObject m_busObject = Sieb_dataBean.getBusObject("Account");
   SiebelBusComp m_busComp = m_busObject.getBusComp("Account");
   m_busComp.activateField("Name");
   m_busComp.executeQuery(true);
   m_busComp.firstRecord();
   Name = m_busComp.getFieldValue("Name");
   System.out.println("Account Name : " + Name);

   m_busComp.release();
   m_busComp = null;

   m_busObject.release();
   m_busObject = null;

   Sieb_dataBean.logoff();
   Sieb_dataBean = null;
}

catch (SiebelException e)
{
   ErrorText = "Code: " + e.getErrorCode() + "\n" + "Description: " + e.getErrorMessage();
   System.out.println("Error Occurred\n " + ErrorText);
}

...

GetErrorMessage Method

The GetErrorMessage method returns a string that contains an error message. For more information, see GetErrorCode Method.

Format

public string getErrorMessage()

No arguments are available.

Used With

Siebel Java Data Bean

TheApplication Method

The theApplication method is a global method that returns a string that contains the name of an application object. This object is the root of objects in the Siebel Application Object hierarchy.

Browser Script Format

theApplication()

Siebel VB Format

TheApplication

Siebel eScript Format

TheApplication()

No arguments are available.

Usage

You can use the theApplication method to determine the object reference of the Siebel application. You can then use this information to find other objects or to call a method on the application object. For example, if you use Siebel eScript to determine if you are logged in to a server database or local database, then you can use the following code:

TheApplication().InvokeMethod("GetDataSource")

Used With

Browser Script, Server Script

Examples

The following Siebel VB example returns the login name from the application object and creates the Employee business object:

Dim oEmpBusObj as BusObject
Dim sLoginName as String

sLoginName = TheApplication.LoginName
Set oEmpBusObj = TheApplication.GetBusObject("Employee")

...

Set oEmpBusObj = Nothing

Siebel Object Interfaces Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.