Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >
GetFieldValue
GetFieldValue returns the value for the field specified in its argument for the current record of the business component. Use this method to access a field value.
Syntax
BusComp.GetFieldValue(FieldName)
Returns
A string containing the field value of the field identified in FieldName, or an error message if the field is inactive or empty.
Usage
Only fields that were active at the time of the BusComp query contain values. For more information, read ActivateField. If this method is used on fields that are not active, or on fields that are empty, an error message is returned.
CAUTION: If a value from a business component that is a child of the current business component is desired, the Link Specification property for that field must be set to TRUE in Siebel Tools. Otherwise, the parent business component cannot access the value in the child business component. For more information, read the Object Types Reference topics within Siebel Tools Online Help.
The FieldName must be enclosed in double quotes and must be spelled exactly as the field name appears in Siebel Tools, with the correct case; for example,
GetFieldValue("ActivityCreatedByName")
The name
"Person who created the activity"
, as shown in the status bar, does not work; nor does the column head"Created By"
.NOTE: In Browser Script, GetFieldValue can be used only for the fields exposed in the applet.
Used With
Browser Script, Server Script, Mobile/Dedicated Web Client Automation Server, COM Data Control, COM Data Server, Java Data Bean, CORBA Object Manager
Example
This Siebel VB sample implementation of the PreSetFieldValue event illustrates the use of GetFieldValue.
Function BusComp_PreSetFieldValue (FieldName As String, FieldValue As String) As Integer
Dim bcOppty As BusComp
Dim boBusObj As BusObject
Dim srowid As String
srowid = GetFieldValue("Id")
Set boBusObj = theApplication.GetBusObject("Opportunity")
Set bcOppty = boBusObj.GetBusComp("Opportunity")
With bcOppty
.SetViewMode SalesRepView
.ActivateField "Sales Stage"
.SetSearchSpec "Id", srowid
.ExecuteQuery ForwardOnly
End WithSet bcOppty = Nothing
Set boBusObj = NothingEnd Function
Here is the equivalent example in Siebel eScript.
function BusComp_PreSetFieldValue (FieldName, FieldValue)
var boBusObj = theApplication().GetBusObject("Opportunity");
var bcOppty = boBusObj.GetBusComp("Opportunity");
var srowid = GetFieldValue("Id");with (bcOppty)
{
SetViewMode(SalesRepView);
ActivateField("Sales Stage");
SetSearchSpec("Id", srowid);
ExecuteQuery(ForwardOnly);
}bcOppty = null;
boBusObj = null;
}See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference Published: 18 June 2003 |