GetBusComp Method for a Business Object

The GetBusComp method returns the name of a business component instance. If an instance of the business component that the BusCompName argument specifies:

  • Exists, then the GetBusComp method returns the name of that instance.

  • Does not exist, then the interpreter starts a new business component instance, and then the GetBusComp method returns the name of this instance.

Format

oBusObj.GetBusComp (BusCompName)

The following table describes the arguments for the GetBusComp method.

Argument Description

BusCompName

String that contains the name of a business component.

The BusCompName argument is case-sensitive. It must match the case of the name that Siebel Tools displays in the Name property of the business component.

Usage

If a business component instance exists but you must create a new instance, then you can do the following:

  1. Use the GetBusObject method to create a new business object instance.

  2. For this new business instance, use the GetBusComp method to create a new business component.

    These steps create a new business component instance that is different from the business component instance that already exists.

If you use a business object instance that already exists, then your configuration includes any other business components that reference that business object instance, even if you use the GetBusComp method.

If you no longer require the business component instance, then use one of the following keywords:

  • In Siebel VB, use Nothing ().

  • In Siebel eScript or Browser Script, use null ().

In Browser Script, the GetBusComp method can only access business component instances in the current view. In Server Script, the GetBusComp method can access every business component instance that exists in the active business object.

Used With

Browser Script, COM Data Control, COM Data Server, Siebel Java Data Bean, Server Script

Examples

The following examples are in Siebel eScript:

  • To access a business component in a UI context:

    var ActiveBO = TheApplication().ActiveBusObject();
    var ConBC = ActiveBO.GetBusComp("Contact");
    
  • To access a business component in a nonUI context:

    var BO = TheApplication().GetBusObject("Account");
    var ConBC = BO.GetBusComp("Contact");