DeactivateFields Method for a Business Component
The DeactivateFields method deactivates fields from the SQL query statement of a business component. It deactivates fields that are currently active. This situation is true except in the following situations:
The Force Active property is TRUE
A link requires the field to remain active.
A business component class requires the field to remain active.
This method does not return any information.
Format
BusComp.DeactivateFields
No arguments are available.
Usage
You must use the ActivateField method to activate a field before you perform a query for a business component. For more information, see ActivateField Method for a Business Component.
After you deactivate a field, you must query the business component again or the Siebel application fails.
Used With
COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script
Examples
The following example is for the Component Object Model (COM):
Dim oBO As BusObject
Dim OBC As BusComp
Dim errCode
Set oBO = SiebelApplication.GetBusObject("Account", errCode)
Set oBC = oBO.GetBusComp("Account", errCode)
oBC.ActivateField "Name", errCode
oBC.ActivateField "Location", errCode
oBC.ClearToQuery errCode
oBC.ExecuteQuery ForwardOnly, errCode
' Manipulate the data
oBC.DeactivateFields errCode
Set oBC = Nothing
Set oBO = Nothing
The following example is in Siebel eScript:
var oBC;
var oBO;
oBO = TheApplication().GetBusObject("Account");
oBC = oBO.GetBusComp("Account");
oBC.ActivateField("Name");
oBC.ActivateField("Location");
oBC.ClearToQuery();
oBC.ExecuteQuery(ForwardOnly);
// Manipulate the data
oBC.DeactivateFields();
oBC = null;
oBO = null;
The following example is in Siebel VB:
Dim oBO As BusObject
Dim oBC As BusComp
Set oBO = TheApplication.GetBusObject("Account")
Set oBC = oBO.GetBusComp("Account")
oBC.ActivateField "Name"
oBC.ActivateField "Location"
oBC.ClearToQuery
oBC.ExecuteQuery ForwardOnly
' Manipulate the data
oBC.DeactivateFields
Set oBC = Nothing
Set oBO = Nothing