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

SetMultipleFieldValues Method


SetMultipleFieldValues assigns a new value to the fields specified in the property set for the current row of the business component.

Syntax

BusComp.SetMultipleFieldValues oPropertySet

Argument
Description

oPropertySet

Property set containing a collection of properties representing the fields to be set, and their values

Returns

Not applicable

Usage

This method can be used only on fields that are active. The FieldName argument in the property must be set exactly as the field name appears in Siebel Tools, with the correct case. For example, in

oPropertySet.SetProperty "Name","Acme"

the FieldName is "Name" and the FieldValue is "Acme".

NOTE:  Do not use the SetMultipleFieldValues method on a field that has a pick list.

Used With

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

Examples

The following example is in Siebel eScript:

var bo = TheApplication().GetBusObject("Opportunity");
var bc = bo.GetBusComp("Opportunity");
var ps = TheApplication().NewPropertySet();

with (ps)
{
   SetProperty ("Name", "Call Center Opportunity");
   SetProperty ("Account", "Marriott International");
   SetProperty ("Sales Stage", "2-Qualified");
}

bc.ActivateMultipleFields(ps);
bc.NewRecord(NewBefore);
bc.SetMultipleFieldValues(ps);
bc.WriteRecord;

ps = null;
bc = null;
bo = null;

The following Java Data Bean example sets multiple fields using SetMultipleFieldValues:

SiebelDataBean      Sieb_dataBean    = null;
SiebelBusObject     Sieb_busObject   = null;
SiebelBusComp       Sieb_busComp     = null;
SiebelPropertySet     ps                = null;

try {

Sieb_dataBean = new SiebelDataBean();
...
Sieb_busObject = Sieb_dataBean.getBusObject("Account");
Sieb_busComp = Sieb_busObject.getBusComp("Account");
ps = Sieb_dataBean.newPropertySet();

with(ps) {

setProperty("Name", "Frank Williams Inc");
setProperty("Location", "10 Main St");
setProperty("Account Status", "Active");
setProperty("Type", "Customer");

}

Sieb_busComp.activateField ("Name");
Sieb_busComp.activateField ("Location");
Sieb_busComp.activateField ("Account Status");
Sieb_busComp.activateField ("Type");

Sieb_busComp.newRecord(true);
Sieb_busComp.setMultipleFieldValues(ps);
Sieb_busComp.writeRecord();

}

catch (SiebelException e) {

system.out.println("Error : " + e.getErrorMessage());

}

ps.release();
Sieb_busComp.release();
Sieb_busObject.release();
Sieb_dataBean.release();

Related Topics

ActivateMultipleFields Method
GetMultipleFieldValues Method

Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.