SetMultipleFieldValues Method for a Business Component
The SetMultipleFieldValues method sets new values in the fields of the current record of a business component. This method does not return any information.
Format
BusComp.SetMultipleFieldValues oPropertySet
The following table describes the arguments for the SetMultipleFieldValues method.
Argument | Description |
---|---|
oPropertySet |
Property set that identifies a collection of properties. This argument identifies the fields to set and the value to set for each field. |
The FieldName argument in the property set must match exactly the field name in Siebel Tools, including the correct case. In the following example, the FieldName is Name and the FieldValue is Acme:
oPropertySet.SetProperty "Name","Acme"
Usage
You can use the SetMultipleFieldValues method only on a field that is active.
Do not use the SetMultipleFieldValues method on a field that uses a picklist.
Used With
COM Data Control, COM Data Server, Siebel 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 Siebel Java Data Bean example sets multiple fields:
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
For more information, see the following topics: