Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

GetMVGBusComp


GetMVGBusComp returns the MVG business component associated with the business component field specified by FieldName. This business component can be used to operate on the multi-value group using the normal business component mechanisms.

Syntax

BusComp.GetMVGBusComp(FieldName)

Argument
Description
FieldName
Name of the field with a multi-value group attached, used to obtain the multi-value group business component

Returns

The multi-value group business component of the current business component and identified field

Usage

A multi-value group is a set of detail records attached to the current record in the business component that holds the corresponding multivalue field.

The GetMVGBusComp should be set to Nothing after use.

NOTE:  In the context of a many-to-many relationship, you can use Siebel VB to either add a new record, that is, associate a new child record, or insert a record, that is, create a brand-new record in the child business component. To add a record, use GetAssocBusComp and the Associate method. To insert a record, use GetMVGBusComp and the NewRecord method.

Used With

Server Script, Mobile/Dedicated Web Client Automation Server, COM Data Control, COM Data Server, Java Data Bean, CORBA Object Manager

Example

The following sample code using GetMVGBusComp adds a new address to the "Hong Kong Flower Shop" account record. For other examples, read ExecuteQuery and FirstSelected.

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

With AccntBC
   .SetViewMode SalesRepView
   .ActivateField "Name"
   .ClearToQuery
   .SetSearchSpec "Name", "Hong Kong Flower Shop"
   .ExecuteQuery
   Set AddrBC = .GetMVGBusComp("Street Address")
End With   

With AddrBC
   .NewRecord NewAfter
   .SetFieldValue "City", "Denver"
   .WriteRecord
End With

Set AccntBO = Nothing
Set AccntBC = Nothing
Set AddrBC = Nothing

See Also

FirstSelected
GetPicklistBusComp


 Siebel Object Interfaces Reference 
 Published: 18 June 2003