GetBusObject Method for an Application

The GetBusObject method creates a new instance of a business object. It returns the name of this new business object instance.

Format

Application.GetBusObject(busObjectName)

The following table describes the arguments for the GetBusObject method.

Argument Description

busObjectName

String variable or literal that contains the name of the business object.

Usage

To delete the business object instance after it is no longer needed, you can set the business object to Nothing.

Used With

COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Examples

The examples in this topic create a new instance of the Account business object and returns the name of the instance of the Account business object.

The following example is in Siebel eScript:

var oBusObject = TheApplication().GetBusObject("Account");
var oBusComp = oBusObject.GetBusComp("Account");

Your custom code

oBusComp = null;
oBusObject = null;

The following example is in Siebel VB:

Dim AccntBO as BusObject
Dim AccntBC as BusComp
Dim AddrBC as BusComp
Set AccntBO = TheApplication.GetBusObject("Account")
Set AccntBC = AccntBO.GetBusComp("Account")

Your custom code

Set AccntBO = Nothing
Set AccntBC = Nothing

Examples of Using the GetBusObject Method to Refer to the Business Object That Is Currently Active

The name of the business object instance that Siebel CRM returns might vary depending on the location where it calls the code, such as a Web applet event. The examples in this topic are useful if you must refer to the business object instance that is currently active.

The following example is for Siebel Java Data Bean:

private SiebelDataBean m_dataBean = null;
private SiebelBusObject   m_busObject = null;
m_busObject = m_dataBean.getBusObject("Opportunity");

The following example is in Siebel eScript:

var oBO = TheApplication().GetBusObject(this.BusObject.Name);

The following example is in Siebel VB:

Dim oBO as BusObject
Dim oBC as BusComp
Set oBO = TheApplication.GetBusObject(Me.BusObject.Name)