You are on page 1of 496

SIEBEL eBUSINESS APPLICATIONS

SIEBEL OBJECT INTERFACES


REFERENCE
SIEBEL 2000
VERSION 6.0
10PA1-TR00-06000

MARCH 2000

Siebel Systems, Inc., 1855 South Grant St., San Mateo, CA 94402
Copyright 2000 Siebel Systems, Inc.
All rights reserved. Published 19992000
Printed in the United States of America
No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including
but not limited to photocopy, photographic, magnetic or other record, without the prior agreement and written
permission of Siebel Systems, Inc.
Target Account Selling Methodologies, Copyright 1996 Target Marketing International, Inc. All rights reserved.
The full text search capabilities of Siebel eBusiness Applications include technology used under license from
Fulcrum Technologies, Inc. and are the copyright of Fulcrum Technologies, Inc. and/or its licensors.
Siebel, the Siebel logo, ActiveBriefing, TrickleSync, TSQ, Universal Agent, and other Siebel product names
referenced herein are trademarks of Siebel Systems, Inc., and may be registered in certain jurisdictions.
Windows is a registered trademark of Microsoft Corporation.
All other product names, marks, logos, and symbols may be trademarks or registered trademarks of their
respective owners.
U.S. GOVERNMENT RESTRICTED RIGHTS. Programs, Ancillary Programs and Documentation, delivered
subject to the Department of Defense Federal Acquisition Regulation Supplement, are commercial computer
software as set forth in DFARS 227.7202, Commercial Computer Software and Commercial Computer Software
Documentation, and as such, any use, duplication and disclosure of the Programs, Ancillary Programs and
Documentation shall be subject to the restrictions contained in the applicable Siebel license agreement. All
other use, duplication and disclosure of the Programs, Ancillary Programs and Documentation by the U.S.
Government shall be subject to the applicable Siebel license agreement and the restrictions contained in
subsection (c) of FAR 52.227-19, Commercial Computer Software - Restricted Rights (June 1987), or
FAR 52.227-14, Rights in General Data Alternative III (June 1987), as applicable. Contractor/licensor is
Siebel Systems, Inc., 1855 South Grant Street, San Mateo, CA 94402.

Proprietary Information
Siebel Systems, Inc. considers information included in this documentation and
in Siebel eBusiness Applications Online Help to be Confidential Information.
Your access to and use of this Confidential Information are subject to the terms
and conditions of: (1) the applicable Siebel Systems software license
agreement, which has been executed and with which you agree to comply; and
(2) the proprietary and restricted rights notices included in this documentation.

Contents

Introduction
Who Should Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2
How This Guide Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2
Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-3
Whats New in This Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-4
Additional Documentation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-5

Contacting Siebel Technical Support . . . . . . . . . . . . . . . . . . . . . . . . Intro-6


Siebel Welcomes Your Comments . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-7

Chapter 1. Siebel Programming Tools


Programming Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Components of the Siebel Programming Environment . . . . . . . . . . . . . . 1-3
Supported Uses of Siebel Programming Languages . . . . . . . . . . . . . . . . . 1-4
Business Rule Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Custom Behavior for User Interface Components . . . . . . . . . . . . . . . . . . . 1-5
Interaction with Third-Party Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Choosing Your Scripting Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Adding New Business Rules to a Business Component . . . . . . . . . . . . . . 1-8
The Siebel Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Using the Siebel Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-10
Scripted Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-13
Script Editing Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-13

Version 6.0

Siebel Object Interfaces Reference

iii

Contents

The Siebel Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15


Using the Siebel Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Debugging and Run-Time Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Checking Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-21
Variable Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Siebel Calls Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Siebel Compiler and Run-Time Engine . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Compilation Order Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Temporary Run-Time Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Getting Started with Siebel VB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
A Few Notes about Siebel eScript . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28

Chapter 2. Programming
Chapter Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Siebel Object Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Siebel COM Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Siebel ActiveX Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Siebel Java Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10
Siebel CORBA Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Built-In Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Usage Evaluation Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Object Types Exposed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Application Object Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Business Object Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Business Component Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Business Service Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Applet Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Property Set Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
User Interface Control Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
Web Applet Object Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20

iv

Siebel Object Interfaces Reference

Version 6.0

Contents

Application Factory Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-20


Summary of Object Types Exposed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Siebel Object Interface Method Syntax . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Interface Description Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-22
Accessing Siebel COM Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-25
Accessing the Siebel COM Data Server with C++ . . . . . . . . . . . . . . . . . .2-26
Accessing Siebel ActiveX Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-39
Accessing Siebel CORBA Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-41
Login Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-41
The Connect String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-42
Error-Handling Differences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-45
Getting Started with the Siebel Object Interfaces . . . . . . . . . . . . . . . . . 2-48
Instantiating the Siebel COM Automation Server . . . . . . . . . . . . . . . . . . .2-48
Instantiating the Siebel COM Data Server . . . . . . . . . . . . . . . . . . . . . . . . .2-50
Instantiating the Siebel ActiveX Application Control . . . . . . . . . . . . . . . . .2-53
Accessing Siebel ActiveX Application Controls on a Thin Client
through JavaScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-54
Instantiating the Siebel ActiveX Data Control . . . . . . . . . . . . . . . . . . . . . .2-55
Instantiating the Java Data Bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-57
Initializing ORB and Binding Siebel App Factory (Orbix) . . . . . . . . . . . . .2-58
Initializing ORB and Binding Siebel App Factory (Visibroker) . . . . . . . . . .2-60
Siebel Object Interface Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62
Locating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-63
Accessing Business Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-63
Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-69
User Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-69
Manipulating Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-70
Global State Properties and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .2-70
Creating a Siebel Application Object in CORBA . . . . . . . . . . . . . . . . . . . .2-71
Variable Scoping for Siebel Script Variables . . . . . . . . . . . . . . . . . . . . . 2-72
Inter-Application Variable Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-74
Tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-74

Version 6.0

Siebel Object Interfaces Reference

Contents

Siebel Object Interface Events and Siebel Extension Events . . . . . . . . . 2-75


Event Method Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-75
How Your Script Affects Program Flow . . . . . . . . . . . . . . . . . . . . . . . . . 2-76
When Events Occur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80
Siebel Business Component Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-81
User Interface Control Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82

Chapter 3. Interfaces Reference


Object Interface Methods Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Object Interface Events

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19

Siebel Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23


Applet Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
ActiveControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Drilldown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FindActiveXControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FindControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GotoControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PostChanges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-25
3-26
3-28
3-29
3-31
3-32
3-33
3-34
3-36
3-37

Applet Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38


Applet_ChangeFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Applet_ChangeRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Applet_GotFocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Applet_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Applet_Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Applet_LostFocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Applet_PreInvokeMethod. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

vi

Siebel Object Interfaces Reference

3-38
3-39
3-40
3-42
3-43
3-44
3-46

Version 6.0

Contents

Application Methods

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48

ActiveApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-48
ActiveBusComp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
ActiveBusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50
ActiveControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-51
ActiveViewName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53
CurrencyCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54
EnableExceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55
FindApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56
GetBusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57
GetLastErrCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58
GetLastErrText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-59
GetProfileAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-60
GetService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-61
GetSharedGlobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-62
GotoApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-63
GotoView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-64
InputBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-66
InvokeMethod. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-68
LoadObjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-69
Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-70
LoginId. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-72
LoginName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73
Logoff. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-74
MsgBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-75
NewPropertySet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-78
PositionId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
PositionName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-80
SetSharedGlobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-82
SetProfileAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83
ShowStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-84
Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-85
TraceOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-87
TraceOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-88

Version 6.0

Siebel Object Interfaces Reference

vii

Contents

Application Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-91


Application_Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-91
Application_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-92
Application_PreClose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-93
Application_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-94
Application_Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-96
Business Component Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-98
ActivateField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-98
AllowNotification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-100
Associate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-101
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-103
ClearToQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-104
DeactivateFields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-105
DeleteRecord. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-106
ExecuteQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-107
ExecuteQuery2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-110
FirstRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-111
FirstSelected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-112
GetAssocBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-113
GetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-115
GetFormattedFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-117
GetLastErrCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-119
GetLastErrText. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-120
GetMVGBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-121
GetNamedSearch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-123
GetPicklistBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-124
GetSearchExpr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-126
GetSearchSpec. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-127
GetUserProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-128
GetViewMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-129
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-130
LastRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-132
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-133

vii i

Siebel Object Interfaces Reference

Version 6.0

Contents

NewRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NextRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NextSelected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ParentBusComp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PreviousRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RefineQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetFormattedFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetNamedSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetSearchExpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetSearchSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetSortSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetUserProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetViewMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SuppressNotification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UndoRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WriteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-134
3-136
3-137
3-138
3-139
3-141
3-142
3-143
3-145
3-147
3-148
3-150
3-154
3-156
3-157
3-159
3-160
3-161

Business Component Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-164


BusComp_Associate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-164
BusComp_ChangeRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-165
BusComp_CopyRecord. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-167
BusComp_DeleteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-168
BusComp_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-169
BusComp_NewRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-170
BusComp_PreAssociate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-171
BusComp_PreCopyRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-172
BusComp_PreDeleteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-173
BusComp_PreGetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-175
BusComp_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-176
BusComp_PreNewRecord. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-177
BusComp_PreQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-178
BusComp_PreSetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-179

Version 6.0

Siebel Object Interfaces Reference

ix

Contents

BusComp_PreWriteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BusComp_Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BusComp_SetFieldValue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BusComp_WriteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-181
3-182
3-184
3-185

Business Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-186


GetBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-186
GetLastErrCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-187
GetLastErrText. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-188
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-189
Business Service Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-190
GetFirstProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-190
GetNextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-191
GetProperty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-192
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-193
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-195
PropertyExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-196
RemoveProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-197
SetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-198
Business Service Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-199
Service_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-199
Service_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-200
Property Set Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-204
AddChild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-204
Copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-206
GetChild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-208
GetChildCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-210
GetFirstProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-211
GetNextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-212
GetProperty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-213
GetType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-214
GetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-215
InsertChildAt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-216

Siebel Object Interfaces Reference

Version 6.0

Contents

PropertyExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RemoveChild. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RemoveProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-217
3-218
3-219
3-220
3-221
3-222
3-223

Control Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-224


Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-224
BusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-225
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-226
GetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-227
GetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-229
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-230
SetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-231
SetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-233
Web Applet Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-234
BusComp . . . . . .
BusObject . . . . . .
InvokeMethod. . .
Name . . . . . . . . .

...
...
...
...

...
...
...
...

...
...
...
...

....
....
....
....

...
...
...
...

...
...
...
...

...
...
...
...

....
....
....
....

...
...
...
...

...
...
...
...

...
...
...
...

....
....
....
....

. .3-234
. 3-234
. 3-235
. 3-236

Web Applet Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-237


WebApplet_InvokeMethod . .
WebApplet_PreInvokeMethod
WebApplet_ShowControl . . . .
WebApplet_ShowListColumn .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-237
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-238
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-239
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-242

SiebelAppFactory Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-245


CreateSiebelAppObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-245
Miscellaneous Methods and Events . . . . . . . . . . . . . . . . . . . . . . . . . 3-247
ControlName_Click . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-247
GetErrorCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-248
GetErrorMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-248
theApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-249

Version 6.0

Siebel Object Interfaces Reference

xi

Contents

Appendix A. Siebel VB Quick Reference


Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-13
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-13
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-17
Miscellaneous Interfaces and Events . . . . . . . . . . . . . . . . . . . . . . . . . A-18

Appendix B. COM Automation Server Quick Reference


Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-11
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-13

Appendix C. COM Data Server Quick Reference


Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-4
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-8
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-8
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-9

xii

Siebel Object Interfaces Reference

Version 6.0

Contents

Appendix D. ActiveX Application Server Quick Reference


Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-3
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-5
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-9
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-10
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-11
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-13

Appendix E. ActiveX Data Control Quick Reference


Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-4
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-8
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-9
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-10

Appendix F. CORBA Quick Reference


Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-4
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-7
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-7
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-8
SiebelAppFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-9

Version 6.0

Siebel Object Interfaces Reference

x iii

Contents

Appendix G. Siebel eScript Quick Reference


Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-3
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-6
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-11
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-11
PropertySet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-13
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-14
Miscellaneous Interfaces and Events . . . . . . . . . . . . . . . . . . . . . . . . . G-15

Appendix H. Java Data Bean Quick Reference


Data Bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-3
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-6
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-6
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-7
SiebelException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-8

Index

xiv

Siebel Object Interfaces Reference

Version 6.0

Introduction

Who Should Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2


How This Guide Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2
Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-3
Whats New in This Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-4
Additional Documentation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-5

Contacting Siebel Technical Support . . . . . . . . . . . . . . . . . . . . . . . . Intro-6


Siebel Welcomes Your Comments . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-7

Version 6.0

Siebel Object Interfaces Reference

I n tr o - 1

Introduction
Who Should Use This Guide

Who Should Use This Guide

Intro

This guide provides complete information about the methods that can be used to
access Siebel events and methods from both internal and external programming
environments. It also includes complete syntax information for the events and
methods themselves.
The audience for this guide consists of:
Siebel Application Persons who plan, implement, and configure Siebel applications,
Developers
possibly adding new functionality. A developer is typically

someone from the Information Services department.


Programmers with experience in other languages can use these volumes to become
proficient in the languages embedded in Siebel Tools. Those with no programming
experience will probably need to turn to other sources for basic information about
programming.

How This Guide Is Organized

Intro

This book comprises three chapters and seven parallel appendices. The first chapter
describes the programming environment embedded in Siebel Tools. The second
details the interfaces available for accessing Siebel objects. The third explains each
of the Siebel events and methods, grouped by the type of object with which they
can be used. The appendices, one for each interface, provide quick references to the
syntax for Siebel events and methods.

In t ro - 2

Siebel Object Interfaces Reference

Version 6.0

Introduction
Typographic Conventions

Typographic Conventions

Intro

This guide uses the following typographic conventions:


To Represent

Syntax Is

Events, objects, and methods

Initial letter uppercase:


Control.SetValue(controlValue)

Arguments to statements or
functions

Lowercase, italics; an internal capital may be used to


indicate multiple English words:
variable, rate, prompt$, controlValue

Optional arguments and/or


characters

Italicized arguments and/or characters in brackets:

Required choice for an argument


from a list of choices

A list inside braces, with OR operator ( | ) separating


choices:

[,caption], [type], [$]

{Goto label | Resume Next | Goto 0}

Version 6.0

Siebel Object Interfaces Reference

I n tr o - 3

Introduction
Whats New in This Release

Whats New in This Release

Intro

Version 6.0 of Siebel Tools has several important new features that are documented
in this guide.
Feature

Description

Business services

Business service objects are objects that can be used to


implement reusable business logic within the Object
Manager. As such, they can be used to implement global
procedures.

Property sets

Property sets are hierarchical, tree-like data structures.


They are used as inputs and outputs to business services,
but have other uses as well.

Control properties

Several properties of control objects can now be


controlled through scripting.

Web applet methods

It is now possible to attach scripts to applets used in


.COM applications supported by the Siebel Web Engine.

Java Data Bean

Siebel object interfaces can now be accessed through


Java programming.

NOTE: Your Siebel implementation may not have all the features described in this

guide, depending on which software modules you have purchased.

In t ro - 4

Siebel Object Interfaces Reference

Version 6.0

Introduction
Additional Documentation

Additional Documentation

Intro

The following documentation also provides information on the topics addressed in


this guide.
Siebel Client Installation and Administration Guide
Siebel Applications Administration Guide
Siebel Tools Guide
Siebel VB Language Reference
Siebel eScript Language Reference
Siebel Release Notes
The Siebel Tools Guide provides a complete description of the Siebel application
development environment, of which the scripting languages Siebel VB and Siebel
eScript are a part.
Users of Siebel VB should become familiar with the Siebel VB Language Reference,
which, together with the present volume, provides a complete description of the
language. Standard Visual Basic methods available within Siebel VB are described
in the Siebel VB Language Reference, while the present volume describes all the
Siebel-specific methods and events.
Users of Siebel eScript should become familiar with the Siebel eScript Language
Reference, which, together with the present volume, provides a complete
description of the language. Standard JavaScript methods as well as some C-like
methods available only in Siebel eScript are described in the Siebel eScript Language
Reference, while the present volume describes all the Siebel-specific methods and
events.
This guide does not provide information about general software concepts, such as
records and queries, or about using Microsoft Windows. Neither does it provide
instructions for basic navigation of Siebel applications. For this kind of information
about Siebel applications, refer to Siebel Basics.
Administrators and developers, such as marketing administrators, call center
administrators, and application developers, should also read the Siebel Applications
Administration Guide for information on how to set up and maintain Siebel
applications features.

Version 6.0

Siebel Object Interfaces Reference

I n tr o - 5

Introduction
Contacting Siebel Technical Support

For copies of these documents, please use Siebel Books Online, accessible via the
Worldwide Services tab on the Siebel Systems Web site (www.siebel.com). Through
Siebel Books Online, you can order additional Siebel documentation and copies of
the Bookshelf for Siebel eBusiness Applications CD-ROM.
Another source of information is the Siebel Online Help.

Contacting Siebel Technical Support

Intro

Do you know how to access Siebel Technical Support? It is crucial that you
understand the requirements for getting support. This will ensure the best
experience possible. If you have questions, please dont hesitate to contact us.
To ensure that you maximize your knowledge of Siebel products and your return on
investment:

 You must attend Siebel training to become a designated contact.


 Your trained designated contacts provide technical support to your users. Siebel
Technical Support provides support to your designated contacts only.
To provide efficient and timely support, and to empower you in the process:

 Siebel Technical Support is primarily Web-based, accessed via Siebel


SupportWeb (http://supportweb.siebel.com). Please submit new service
requests to us through SupportWeb, where you can also search the knowledge
base for solutions.

 Designated contacts receive read/write access to SupportWeb. All other project


team members at your company receive a read-only account to ensure they can
reap the benefits of the support knowledge base.

In t ro - 6

Siebel Object Interfaces Reference

Version 6.0

Introduction
Siebel Welcomes Your Comments

To register for Siebel training, please access http://www.siebel.com/education/ and


choose Siebel Customer Technical Education. Questions on the above can be
directed to Siebel Technical Support at:
eBusiness Customers:

support@siebel.com

Workgroup Customers: swasupport@siebel.com or:


Americas: eBusiness: 800.214.0400 or 650.295.5724 Workgroup: 800.354.1571
London:

+44.1784.494.949

Tokyo:

+81.3.5469.3811(main number)

Munich:

+49.89.95718.400

Singapore: +65.320.8533 (main number)

Please submit technical issues and updates to Siebel SupportWeb


(http://supportweb.siebel.com). If you do not have a SupportWeb account, please
email us at the relevant email address above. Thank you and we hope you enjoy
working with Siebel Technical Support!

Siebel Welcomes Your Comments

Intro

To help us with future versions, we want to know about any corrections or


clarifications that you would find useful. Please include in your message:

 The title and version of this guide


 Your name, your company name, job title or functional area, phone number,
and email address
Write to us via regular mail or email at:
Siebel Systems, Inc.
Technical Publications Department
1855 South Grant Street
San Mateo, CA 94402-2667
doc@siebel.com
We appreciate your feedback.

Version 6.0

Siebel Object Interfaces Reference

I n tr o - 7

Introduction
Siebel Welcomes Your Comments

In t ro - 8

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools

Programming Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2


Components of the Siebel Programming Environment . . . . . . . . . . . . . . 1-3
Supported Uses of Siebel Programming Languages . . . . . . . . . . . . . . . . . 1-4
Business Rule Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Custom Behavior for User Interface Components . . . . . . . . . . . . . . . . 1-5
Interaction with Third-Party Software . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Choosing Your Scripting Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Adding New Business Rules to a Business Component . . . . . . . . . . . . . . 1-8
The Siebel Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Using the Siebel Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Scripted Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Script Editing Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
The Siebel Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Using the Siebel Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-16
Debugging and Run-Time Preferences . . . . . . . . . . . . . . . . . . . . . . 1-18
Checking Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-20
Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Variable Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Siebel Calls Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Siebel Compiler and Run-Time Engine . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Compilation Order Considerations . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Temporary Run-Time Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Getting Started with Siebel VB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
A Few Notes about Siebel eScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28

Version 6.0

Siebel Object Interfaces Reference

1-1

Siebel Programming Tools


Programming Tools

Programming Tools

The Siebel applications include two programming languages. Siebel VB is a


complete Visual Basic-like programming environment that includes an editor,
debugger, and interpreter/compiler. Siebel eScript is, similarly, a JavaScript-like
programming environment, which uses the same tools that Siebel VB uses. With
these built-in languages, you can extend and configure your Siebel application
beyond the capabilities provided by declarative object property definition. The
languages are integrated with other Siebel tools, such as the Applet Designer, Siebel
CTI, and Siebel SmartScript. This integration allows you to define object properties
both with the designer and by attaching scripts.
Caution: You should regard coding as a last resort. Siebel Tools
provides many ways to configure your Siebel application without
coding, and these methods should be exhausted before you attempt
to write your own code, for three reasons:

 Its easier to use Siebel Tools than it is to write code.


 More important, your code may not survive an upgrade.
Anything created directly by Siebel Tools will be upgraded
automatically when you upgrade your Siebel application, but
your code will not be touched, and your code may need to be
reviewed following an upgrade.

 Finally, declarative configuration through Siebel Tools results in


better performance than implementing the same functionality
through code.

1-2

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


Components of the Siebel Programming Environment

Components of the Siebel Programming Environment

The individual components of the Siebel programming environment include:

Siebel VB language. A complete programming language that is syntactically and

semantically compatible with Microsoft Visual Basic. Because the language


uses most of the same commands and standards as Microsoft Visual Basic, you
can quickly extend your Siebel application and reduce training costs.

Siebel eScript language. A complete programming language that is syntactically

and semantically compatible with Netscape JavaScript. In parallel with Siebel


VB, the language uses most of the same commands and standards as JavaScript,
giving you the same advantages in an alternative language. Moreover, you can
use Siebel eScript under UNIX, where Siebel VB is not supported.

Siebel Script Editor. An integrated editor used to create, view, edit, and save

custom program routines. The Siebel Editor is similar to the code editor that
accompanies Microsofts Visual Basic program. The Siebel Editor is described in
more detail in The Siebel Script Editor on page 1-9.

Siebel Debugger. Assists you in detecting errors contained within Siebel

programming language routines. It does not assist in detecting errors outside of


the context of custom program routines. The Siebel Debugger can be invoked
automatically from Siebel applications when a run-time error occurs if the Siebel
application was invoked with the debug option, /H, on the command start-up
line. The Debugger can also be invoked from the Debug toolbar and Debug
menu. The Debugger is described in more detail in The Siebel Debugger on
page 1-15.

Version 6.0

Compiler/Interpreter. A nonvisual component of the Siebel programming


languages that compiles and executes Siebel custom program routines. It is
similar to Microsofts Visual Basic Language Interpreter. Siebel language
routines are compiled into p-code and stored with the other object definitions
in the .srf file.

Object Interfaces. A collection of selected objects that expose their data and
functionality to custom routines. The interface provides access to Siebel
business objects with defined methods, events, and associated data. The
object interfaces are the subject of this book.

Siebel Object Interfaces Reference

1-3

Siebel Programming Tools


Supported Uses of Siebel Programming Languages

Supported Uses of Siebel Programming Languages

The Siebel programming languages provide the ability to extend the behavior of the
Siebel application in specific ways. Supported extensions can be grouped into the
following:

 Business rule definition


 Custom behavior for user interface components
 Interaction with third party software
Caution: Accessing server management functions through COM or
other external programming interfaces is not supported. Server
management functions should be accessed only through the user
interface or the command line.

Business Rule Definition

The Siebel programming languages let you extend data validation beyond what
is already provided for in the standard Siebel application. The unique validation
requirements of a business can be satisfied by custom extension routines that
implement the specific business rules prior to performing record manipulation
operations, such as record write or record delete.
Data validation routines may incorporate validations based on data from sources
within or outside the Siebel application. For example, a validation routine may
verify that an opportunity revenue amount is greater than zero if the probability
of the opportunity is more than 20 percent using internal Siebel data. Alternatively,
an extension routine could verify the availability of a conference room prior to
inserting a new activity record by reading the information from another
applications database table.
The Siebel programming languages provide data manipulation capabilities that
can be used to modify data, such as updating, inserting, and deleting records.
For example, a custom routine can be used to set the value of one field based on
the value of another before a new record is created. A custom routine could thus
be used to set the value of opportunity probability based on a stage in the sales
cycle, simplifying data entry.

1-4

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


Supported Uses of Siebel Programming Languages

The methods used to support data manipulation provide error notification. The
Siebel programming language is notified of the error and has access to information
to allow you to handle the error and take appropriate action.
All data manipulation methods in the Siebel programming languages conform to the
same visibility rules as the standard Siebel applications user interface. For example,
if a business object is readable but not editable because of visibility rules in the
Siebel applications user interface, the same will be true when you are accessing the
object through the Siebel languages. These languages cannot circumvent the
visibility rules or the security constraints enforced by the standard Siebel
applications.

Custom Behavior for User Interface Components

With Siebel Applet Designer, you can add selected user interface objects to applets.
With the Siebel programming languages, you can associate behavior to the objects.
An example of this feature is placing a button on an applet which, when clicked,
launches another program such as Excel.
With the Siebel programming languages, you can update a particular field based on
the values of other fields in the system. An extension routine could enforce the
business rule that states, If the sales cycle is at or past the Quote Submitted stage,
do not allow the Revenue field to be modified. The feature can also be used to
support the user-specific data maintenance rule, by restricting updates to certain
fields based on the position of the current user.

Version 6.0

Siebel Object Interfaces Reference

1-5

Siebel Programming Tools


Supported Uses of Siebel Programming Languages

Interaction with Third-Party Software

The data transport functionality of the Siebel programming languages is designed


to provide interactive transportation of small volumes of data between the Siebel
application and other well-behaved applications on the client machine. This
functionality complements that of the Siebel Integration Manager, which is
designed for the exchange of large volumes of data on the server machine.
You can export data from Siebel applications and pass it directly to other wellbehaved, COM-compliant applications on the client machine. You can extract
specific information from Siebel applications, apply custom logic, perform
calculations with the data, and then export the data to other applications such
as Excel or electronic mail.
With the Siebel programming languages you can also import data from other wellbehaved, COM-compliant applications on the client machine and pass it directly
into Siebel applications. The imported data may be used to update existing records
in or add new records to the Siebel database.
You can read selected data from an ASCII file and insert it into Siebel applications
on the client machine. In some instances, such as when an application uses a closed
architecture, an ASCII file may be the only available mechanism to integrate an
external application with your Siebel application. The Siebel languages also provide
the ability to export data from Siebel applications directly to an ASCII file.
With the Siebel programming languages, you can launch other applications by
associating an extension routine with a button control or with a Siebel event.
The extension routine contains code to execute the other application and to
pass appropriate data to that application in the form of start-up parameters.
When the button is clicked by the end user, your custom program launches
another application, such as Excel, and passes the required data. When the other
application starts, it will receive the user focus and become the active window.
When the other application is closed, control returns to Siebel applications.

1-6

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


Choosing Your Scripting Language

Choosing Your Scripting Language

Internal scripts are created in the Script Editor embedded in Siebel Tools. You can
enable either Siebel VB or Siebel eScript, but not both. To choose which language
will be active in Siebel Tools, you must make a change to the configuration file.
NOTE: The Siebel programming languages are not available on any of the Siebel Thin
Clients. The Siebel Thin Clients do not support any kind of scripting that involves
user interface objects, because scripts cannot be run on the clients.

To specify your scripting language


1 Choose Start

 Find  Files or Folders.

2 Enter *.cfg as the search specification, and the drive on which your Siebel
application and Siebel Tools are located in the Look in: field. (If your Siebel
application and Siebel Tools are on different drives, repeat this procedure for
both drives.)
3 For every .cfg file in a Siebel\bin or siebdev\bin directory:
a Open the file in Notepad or another text editor.
b Search for the text ScriptingDLL.
c If you want to use Siebel eScript, change the value assigned to this key
to sscfjs.dll.
d If you want to use Siebel VB, change the value assigned to this key to
sscfbas.dll.

Version 6.0

Siebel Object Interfaces Reference

1-7

Siebel Programming Tools


Adding New Business Rules to a Business Component

Adding New Business Rules to a Business Component

The following procedure describes the steps required to add new business rules to
a business component.

To add business rules to a business component


1 Launch Siebel Tools.
2 Choose Repository

 Check Out to lock the project from the server repository.

3 Select the business component using the Object Explorer and Object List Editor.
4 Click the right mouse button to bring up the pop-up menu. Select Edit Scripts.
5 Select the event from the Proc pick list and add your Siebel script in the
code window.
6 Validate the Siebel script syntax by selecting Debug: Check Syntax.
7 Choose File

 Save to save the changes.

8 Compile the modified business component by pressing F7.


9 Press F5 to run the modified application and test the new control.
10 Choose Repository
repository.

1-8

 Check In to check the modified project into the server

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Script Editor

The Siebel Script Editor

The Siebel Script Editor is a simple window-based editor designed to create and
maintain Siebel VB or Siebel eScript programs.
When creating Siebel custom programs, note the following:

 Check out or lock the project containing the object definitions being modified.
If the project is not locked, you will be unable to add any text in the Editor
window.

 Choose Debug

Check Syntax to verify the syntax of your Basic or eScript


program. The Siebel Compiler reports any syntax errors and indicates the lines
where they occur.

 Choose File

Save when you have finished entering and editing the custom
statements to save your work. Closing the Siebel Script Editor without saving
your work will discard the changes.

 Before you run the application, you must compile the projects that you have
modified and generate a new .srf file. See the Siebel Tools Guide for information
on the Object Compiler.

 Run the application with the new application extensions by choosing

Debug Start or clicking the Start button in the Debug toolbar. The Siebel
application executes with the new modifications incorporated.

 You may inadvertently create programming errors that, when encountered, will
halt the execution of the extension routine. If you started Siebel applications in
debug mode (/H option on the command start-up line), a message box opens
indicating the nature of the error. You can then return to the Script Editor and
choose Debug Check Syntax. For further details, see Checking Syntax on
page 1-20.

 When a script error is encountered by an end user, or when the Siebel


application is not running in Debug mode, the application displays an
appropriate error message and returns control back to the point in the standard
Siebel code just prior to the error.

Version 6.0

Siebel Object Interfaces Reference

1-9

Siebel Programming Tools


The Siebel Script Editor

Using the Siebel Script Editor

To access the Siebel Script Editor (shown in Figure 1-1), select an object definition
in the Object List Editor and click the right mouse button. If the editor is available
from that object type, you can select Edit Scripts from the dialog box. Siebel scripts
can be attached to the object types application, applet, and business component.

Figure 1-1.

Siebel Script Editor

The Siebel Script Editor is an easy-to-use, window-based editor similar to the


Windows Notepad editor. The Editors interface consists of a title bar, a drop-down
list for specifying an object, a drop-down list for specifying an event, and a text
entry window. There are vertical and horizontal scroll bars to enable you to scroll
within the entry region.

1-10

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Script Editor

Once you are in the Siebel Script Editor, you can do the following:

 Cut, copy, and paste the text from one location to another location within or
from outside the Editor.

 Import and export Siebel scripts.


 Associate a given Siebel script with a predefined object event, such as a click
event for a button object.

 Debug a custom routine by invoking the Siebel Debugger.


 Compile a custom routine by invoking the Siebel Compiler from the Siebel
Script Editor.
The editor functions can be accessed from the title bar menus, keyboard shortcuts,
and the Edit toolbar. The following are File menu options pertaining to Siebel VB
and Siebel eScript:

Import. Imports Siebel scripts.

Export. Exports Siebel scripts.

Save. Saves a Siebel script. Be sure to save your scripts before exiting the editor.

Exit. Closes the Siebel Script Editor window.

The following are Edit menu options pertaining to the Siebel Editor:

Cut. Deletes selection and saves it to the Clipboard.

Copy. Copies selection to the Clipboard.

Paste. Copies what is on the Clipboard to the selected area.

Delete. Deletes selection.

Select All. Selects the entire script.

Find. Displays the Find in Script dialog box. You can search for text or

white space.

Replace. Displays the Replace in Script dialog box. You can search and replace

text or white space.

Version 6.0

Siebel Object Interfaces Reference

1-11

Siebel Programming Tools


The Siebel Script Editor

Some editing functions are available from the Edit toolbar. The Edit toolbar appears
in Figure 1-2.

Redo
Undo
Paste
Copy
Cut
Save All
Save
New

Figure 1-2.

Edit Toolbar

The toolbar icons perform the same functions as the comparably-named menu
options described previously.
Caution: For each of the Siebel script edit boxes, a limit of 16k
characters exists. Each subroutine or function has its own edit box
and therefore can be up to 16k. The same limit applies to the
(general) (declarations) section. If you are approaching this limit,
try the following hints to reduce the size of your script:

 Remove extraneous comments.


 Indent code using tabs instead of spaces.
 Use short variable and method names.
 Create subroutines and functions.

1-12

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Script Editor

Scripted Flag

For object types that can have a Siebel script attached to them (applet, application,
and business component), there is a property in the Object List Editor called
Scripted. This property indicates whether Siebel scripts are attached to the object
definition. A check mark indicates the presence of scripts; no check mark indicates
that the object definition has no scripts.

Script Editing Preferences

To access the script editing preferences, choose Tools


Scripting tab (see Figure 1-3).

Figure 1-3.

Version 6.0

 Options and then click the

Script Editing Preferences

Siebel Object Interfaces Reference

1-13

Siebel Programming Tools


The Siebel Script Editor

The following window features in this tabbed form apply to script editing:

Font field. Used to select the font for display of scripts.

Tab Width field. Defines the number of spaces for a tab character. The default is

four spaces.

Auto Indent field. When checked, each succeeding line is indented to the position
set by the current line.

Maximum Levels of Undo field. Specifies the number of changes that are saved and

can be undone.

1-14

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Debugger

The Siebel Debugger

The Siebel Debugger assists in editing and removing errors from scripts written in
Siebel VB and Siebel eScript.
The Siebel Debugger uses the Siebel Script Editor window plus a diagnostic window
to display program variables and their values. The Debugger helps you locate and
correct execution errors in custom program routines. It allows you to slow or
suspend execution of the program routines so that the program flow and variable
contents can be examined.
The Siebel Debugger allows you to do the following:

 Set and clear breakpoints in your Siebel script. A breakpoint is a marker on a


line of Basic code that tells Basic to suspend execution at that line so that the
state of the program can be examined using the Debugger.

 Step over a line of code. If the current line is a call to a subroutine or function,
the Debugger stops at the next line in the current procedure (skipping the
subroutine).

 Step into a subroutine of custom routine code. Step Into is used to execute one
line of code in the Debugger. If the current line is a call to a subroutine or
function, the Debugger stops at the first line of that function. Otherwise, the
Debugger stops at the next line of the current procedure.

 View the value of custom routine variables. The Siebel Debugger includes a
window in which variables and their values are displayed. This window can be
used to monitor the values of specific variables as the custom routine executes.

Version 6.0

Siebel Object Interfaces Reference

1-15

Siebel Programming Tools


The Siebel Debugger

Using the Siebel Debugger

You can access the Debugger in several ways:

 You can set breakpoints in the current routine and begin execution by clicking
the Start button. Execution is suspended when one of the lines that contains a
breakpoint is about to be executed. The Debugger is activated and it highlights
the line containing the breakpoint.

 If an executing program encounters a run-time error, such as an unhandled


Siebel VB or eScript error, execution is suspended, the Debugger is activated,
and it highlights the line containing the error.
Debug options are available from the Debug title bar menu and the Debug toolbar
(see Figure 1-4).

Step Over
Step Into
Calls
Watch
Toggle Breakpoint
End
Break
Start
Check Syntax

Figure 1-4.

Debug Toolbar And Debug Menu

The buttons in the Debug toolbar are described as follows:

Check Syntax button. Compiles the current Siebel script and verifies syntax.

Start button. Starts the application. A dialog box with start-up parameters is

also displayed.

1-16

Break button. Stops the execution of the currently running Siebel script. If a
Siebel script is not running, no operation is performed.

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Debugger

End button. Stops the execution of the application and returns to the Siebel Script
Editor window.

Toggle Breakpoint button. Sets or removes a breakpoint on a specific line of code.

Watch button. The Tools menu establishes variable watches, so you can monitor

the contents of program variables in the Variable window during execution of


Siebel VB and Siebel eScript routines.

Calls button. Displays the list of Siebel VB or Siebel eScript routine calls executed

up to the point where the application was stopped.

Step Into button. Executes the next line of code. If this is a subroutine or

procedure call, execution will occur within that procedure.

Version 6.0

Step Over button. Advances the application to the code line just after the current
subroutine or procedure. Execution remains at the level of the current procedure.

Siebel Object Interfaces Reference

1-17

Siebel Programming Tools


The Siebel Debugger

Debugging and Run-Time Preferences


To access the debugging preferences, select Tools
Scripting tab (see Figure 1-5).

Figure 1-5.

 Options and then click the

Debugging Preferences

This dialog box has the following debugger settings:

Adjust breakpoint to next valid line. When breakpoints are deleted on invalid lines,

this option creates a breakpoint at the next valid line.

Make debugger window active when debugging. The Siebel Debugger window

appears whenever you are in debug mode.

Always enter the debugger when an error occurs. The Siebel Debugger window

appears whenever a script error occurs.

1-18

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Debugger

To access the run-time preferences, select Tools


time tab (see Figure 1-6).

Figure 1-6.

 Options and then click the Run-

Run-Time Preferences

This dialog box has the following preference settings:

Command line. The command line to start the application. You can place the

/H option in the line to make the Debugger available.

Start directory. Application start-up directory (location of DLLs).

Prompt for this information each time. The Preferences dialog box appears

whenever Start or Restart is selected.

Version 6.0

Siebel Object Interfaces Reference

1-19

Siebel Programming Tools


The Siebel Debugger

Checking Syntax

The debugger includes a syntax checker to ensure that your script will compile
properly. (Its up to you to see to it that the script does what you want it to do.)

To check the syntax of your script


1 Click the Check Syntax button or choose Debug

 Check Syntax.

Siebel Tools does a test compile. If you have made no errors, you get no
response. If there are errors in your script, a message box will appear, describing
the error. The message box has two buttons: Next Error and Go to Line. If there
is more than one error, its best to handle them one at a time.

2 Click Go to Line.
The cursor falls on the line of the script containing the error, with the line
highlighted.

3 Correct the code and check the syntax again.


If the syntax of the line you changed is now correct, the message box will display
the next error, if any.

4 Repeat Step 2 and Step 3 until you see no more messages.

5 Choose File Save to save your file. Close the Siebel application. Press F7 to
compile the .srf file. When the compilation is finished, click the Run button or
press F5 to restart the application.
Caution: The Check Syntax function checks only for syntax errors
and errors that stem from failure to properly initialize objects or
variables. It does not check other types of errors, and cannot trap
errors in logic that may cause run-time errors.

1-20

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


The Siebel Debugger

At this point, your script should run. Test it to see if it gives you the desired results.
The following sections describe debugging tools to help you accomplish that end.
Caution: The Check Syntax command checks only the script in the
active object definition. If there are errors in other scripts, you will
not be able to compile the .srf file.

Breakpoints

A breakpoint is a marker on a line of Siebel code that tells the interpreter to suspend
execution at that line so that the state of the program can be examined using the
Debugger. There are two ways to set breakpoints on lines of Siebel code when
editing, and there is an additional way to set a breakpoint when debugging.

 When editing, place the cursor on the line of code on which you wish to set a
breakpoint by clicking on that line with the mouse or using the arrow keys.
Then press the F9 function key or the toolbar icon to toggle the breakpoint. If
the line already had a breakpoint on it, pressing F9 or the toolbar icon will
clear the breakpoint.

 When debugging, clicking on a line of Siebel code toggles a breakpoint on


that line.

Version 6.0

Siebel Object Interfaces Reference

1-21

Siebel Programming Tools


The Siebel Debugger

Variable Window

The variable window is used to examine the contents of the variables associated
with a Siebel script when debugging.

Siebel Calls Window

The Calls window contains a list of subroutine and function calls that were executed
prior to the current line. To access the Calls window, click the Calls button in the
Debugger toolbar when you are running the Debugger. A typical call window may
contain several lines, one for each subroutine entered into and not yet completed.
Selecting an entry in this list box will cause the interpreter to shift to that entry.
The Debugger window displays the line of code that made the call, and the Variable
window displays the variables that are associated with the procedure that made
the call.

1-22

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


Siebel Compiler and Run-Time Engine

Siebel Compiler and Run-Time Engine

To invoke the Siebel Compiler and Run-time Engine, click the Compile button on
the Debugger toolbar, or press F7. You can also invoke it when compiling a project
containing object definitions with associated Siebel scripts. The Siebel Compiler
and Run-time Engine has no user interface of its own. When the compiler is
invoked, it compiles the custom routines and returns a message when completed
that indicates success or failure.

Compilation Order Considerations

The Siebel Compiler compiles Siebel VB functions and procedures in alphabetical


order within an object definition. If a function or procedure calls another function
or procedure that has not been defined, the compiler will generate an error message
of the form function_name Is An Unknown Function.
In order to avoid this error, use the Declare statement to declare the function or
procedure in the (general) (declarations) section. Please refer to the Siebel VB
Language Reference for more details regarding this statement.
Siebel eScript does not require forward declaration of functions.

Temporary Run-Time Files

Whenever a Siebel object that has a Siebel VB script attached is instantiated, the
Run-time Engine creates a temporary file in the applications Temp directory (usually
C:\Siebel\Temp). These files have the extension .sbx. If multiple copies of an
object are instantiated through an external object, an equal number of .sbx files will
be created. These files are automatically deleted when the object is destroyed or the
Siebel application is terminated.
These temporary files are an internal implementation characteristic and cannot be
interpreted, modified, or debugged by the user.
Siebel eScript does not create these temporary files.

Version 6.0

Siebel Object Interfaces Reference

1-23

Siebel Programming Tools


Getting Started with Siebel VB

Getting Started with Siebel VB

If you have never programmed in Visual Basic before, it is recommended that you
start with the Siebel VB Language Reference. That manual includes a complete
reference to the internal VB program constructs, statements, and functions. You will
need to understand how these objects behave before you can program effectively
using the Siebel object methods and events.
Declare your variables. As a general rule, it is helpful to use the Option Explicit

statement, which forces you to declare all your variables (using the Dim statement)
before you use them. Doing so makes it easier for others to understand your code,
and for you to debug the code. You can declare a variable without giving it a data
type, but if you dont specify a data type, Siebel VB will assume the type Variant,
which requires 16 bytestwice as much memory as the next smallest data type. If
you can avoid Variant variables, you will reduce the amount of memory required by
your code, which may make execution faster. In Siebel VB, you place Option
commands in the (general) (declarations) window.
Use standardized naming conventions. Another way to improve the readability of your

code is to follow a set of standardized naming conventions. It doesnt really matter


what conventions you follow as long as everyone in the programming group follows
the same conventions. One very common convention is to prefix each variable with
a letter denoting its type, as shown here.
Data Type

1-24

Symbol

Example

String

sName

Integer

iReturn

Long integer

lBigCount

Single-precision number

si

siAllowance

Double-precision number

dBudget

Object

oBusComp

Currency

cAmtOwed

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


Getting Started with Siebel VB

You can also use suffix characters on your variable names. See the Siebel VB
Language Reference for details on these characters.
Use the Me object reference. The special object reference Me is a VB shorthand for

the current object. You should use it in place of references to active business
objects. For example, in a business component event handler, you should use Me in
place of ActiveBusComp, as shown in the following example. You can see other
examples of Me in ParentBusComp on page 3-138, SetViewMode on page 3-157,
BusComp_PreQuery on page 3-178, BusComp_PreWriteRecord on page 3-181, and
Applet on page 3-224.
Function BusComp_PreSetFieldValue(FieldName As String, FieldValue
As String) As Integer
If Val(Me.GetFieldValue(Rep %)) >75 Then
....
End If
BusComp_PreSetFieldValue = ContinueOperation
End Function
Trap run-time errors. The standard VB methods documented in the Siebel VB

Language Reference return numeric error codes, which are documented in an


appendix in that manual. Siebel VB methods also may return error codes; however,
they must be handled differently from those returned by the standard VB methods.
For standard methods, you can use some combination of Err, ErrText, and Error,
which are documented in the Siebel VB Language Reference. Siebel methods use
numeric error codes in the range from 4000 to 4999. When you access Siebel object
interfaces via COM or ActiveX, use a construct of this form to see the text of the
error message:
If errCode <> 0 Then
ErrText = GetLastErrText
MsgBox ErrText
Exit Sub
End If

NOTE: The GetLastErrText method is available only via interfaces external to Siebel

Tools. Therefore, you can use it in Microsoft VB, but not in Siebel VB.

Version 6.0

Siebel Object Interfaces Reference

1-25

Siebel Programming Tools


Getting Started with Siebel VB

If you are working within the Siebel applications, especially in a LAN environment,
where you cannot be sure that a record hasnt been changed or deleted by another
user, its important to create routines that will keep the program from failing when
it meets an unexpected condition. You will find information about error-handling
routines in the Language Overview chapter of the Siebel VB Language Reference.
Make effective use of the Select Case construct. The Select Case construct allows the

program to choose among any number of alternatives you require, based on the
value of a single variable. It is greatly preferable to a series of nested If statements,
because it simplifies code maintenance, and also improves performance, because
the variable must be evaluated only once. For a full description, see the Siebel VB
Language Reference.
Use the With shortcut. The With statement (see the Siebel VB Language Reference)
allows you apply several methods to a single object. It makes the code easier to
read, reduces typing, and improves performance. Instead of a series of statements
such as
Set oBusComp = objBusObject.GetBusComp("Opportunity")
oBusComp.ClearToQuery
oBusComp.SetSearchSpec . . .
oBusComp.ExecuteQuery ForwardBackward
oBusComp.FirstRecord
oBusComp.NewRecord NewAfter
oBusComp.SetFieldValue "QuoteNumber", sQuoteId
oBusComp.SetFieldValue "Account", sAccount
. . .
sSolutionId(cSolution) = oBusComp.GetFieldValue( "Id" )
. . .

use the following:


Set oBusComp = objBusObject.GetBusComp("Opportunity")
With oBusComp
.ClearToQuery
.SetSearchSpec . . .
.ExecuteQuery ForwardBackward
.FirstRecord
.NewRecord NewAfter
.SetFieldValue "QuoteNumber", sQuoteId
.SetFieldValue "Account", sAccount
. . .
sSolutionId(cSolution) =.GetFieldValue( "Id" )
. . .
End With

1-26

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


Getting Started with Siebel VB

Use extreme care when working with date variables. When working with date variables

extreme care has to be taken regarding the date format. GetFieldValue always
returns the date in the format "dd/mm/yyyy" (eventually followed by the time). As
a result, applying the CVDate() function, which expects the regional setting, to the
return value may cause an error. The GetFormattedFieldValue method uses the
regional settings of the user's operating system. The regional setting specifies the
year with two digits in most cases, thereby creating the possibility of Y2K noncompliance. For these reasons, you should use the following approach for
performing date arithmetic:

1 Retrieve the value of date fields with the GetFieldValue method (see page 3-115).
2 Convert it into a date variable using the DateSerial() function (see the Siebel VB
Language Reference).
3 Perform the required date arithmetic.
Here is an example:
Dim strDate as String, varDate as Variant
strDate = oBC.GetFieldValue("Date Field")
varDate = DateSerial(Mid(strDate,7,4), Left(strDate,2), _
Mid(strDate,4,2))
[any date arithmetic]
Destroy any objects you have created when you no longer need them. Although the

system will eventually clean up objects, you can do so more efficiently than the
system. Moreover, in some instances, failure to clean up after yourself can create a
serious drain on performance and resources.
To destroy an object in Siebel VB, set it to Nothing. The best practice is to destroy
objects in the order opposite to the order of creation. For example:
Set oApplet = Me
Set oBC = oApplet.BusComp
[ Your code here ]
Set oBC = Nothing
Set oApplet = Nothing

Version 6.0

Siebel Object Interfaces Reference

1-27

Siebel Programming Tools


A Few Notes about Siebel eScript

A Few Notes about Siebel eScript

There are some important differences between Siebel eScript and Siebel VB:

 Siebel eScript is case sensitive; theApplication is different from TheApplication.


Siebel VB is not case sensitive.

 Siebel eScript does not distinguish between subroutines (which take no


arguments) and functions (which take arguments). In Siebel eScript, every
method is a function, whether or not it accepts arguments; therefore, it should
be followed by a pair of parentheses.
Keep these differences in mind when you read the syntax diagrams. In many
instances, the only difference between the VB syntax and the eScript syntax is that
the eScript syntax requires the pair of parentheses at the end. In these instances,
only the VB syntax is shown; you can derive the eScript syntax simply by adding
the parentheses.
There are also some important differences between Siebel eScript and standard
ECMAscript. Most important, Siebel eScript has no user interface functions. It
cannot, therefore, be used to animate or control Web pages. Second, it contains two
objects that are not part of standard ECMAscript: SELib and Clib. These objects
implement a variety of C-like functions for interacting with the operating and file
systems, and for file I/O. For details on these and other eScript functions not
covered in this manual, see the Siebel eScript Language Reference.
Declare your variables. Standard ECMAscript does not require that you declare

variables. Variables are declared implicitly as soon as they are used. However, Siebel
eScript requires you to declare variables with the var keyword. As a general rule, it
is helpful to declare all variables used in a module before you use them. Doing so
makes it easier for others to understand your code, and for you to debug the code.
There is one notable exception to this standard. Declaring a variable inside a loop
controller restricts the scope of that reference to within the loop. This prevents the
variable from persisting; it can therefore be declared again inside another loop.
Use the this object reference. The special object reference this is eScript shorthand

for the current object. You should use it in place of references to active business
objects and components. For example, in a business component event handler, you
should use this in place of ActiveBusComp, as shown in the following example.

1-28

Siebel Object Interfaces Reference

Version 6.0

Siebel Programming Tools


A Few Notes about Siebel eScript

function BusComp_PreQuery ()
{
this.ActivateField("Account");
this.ActivateField("Account Location");
this.ClearToQuery();
this.SetSortSpec( "Account(DESCENDING)," +
" Account Location(DESCENDING)");
this.ExecuteQuery();
return (ContinueOperation);
}
Use the with shortcut. The with shortcut (see the Siebel eScript Language Reference)

allows you apply several methods to a single object. It makes the code easier to
read, reduces typing, and improves performance. Instead of a series of statements
such as:
var oBusComp = oBusObject.GetBusComp("Opportunity");
oBusComp.ClearToQuery();
oBusComp.SetSearchSpec( . . .);
oBusComp.ExecuteQuery(ForwardBackward)
oBusComp.FirstRecord();
oBusComp.NewRecord(NewAfter);
oBusComp.SetFieldValue("QuoteNumber", sQuoteId);
oBusComp.SetFieldValue("Account", sAccount)
. . .
sSolutionId(cSolution) = oBusComp.GetFieldValue( "Id" );
. . .

use the following:


var oBusComp = oBusObject.GetBusComp("Opportunity");
with oBusComp
{
ClearToQuery();
SetSearchSpec( . . .);
ExecuteQuery(ForwardBackward)
FirstRecord();
NewRecord(NewAfter);
SetFieldValue("QuoteNumber", sQuoteId);
SetFieldValue("Account", sAccount)
}
. . .
sSolutionId(cSolution) = oBusComp.GetFieldValue( "Id" );
. . .

Version 6.0

Siebel Object Interfaces Reference

1-29

Siebel Programming Tools


A Few Notes about Siebel eScript

Make effective use of the Switch construct. The Switch construct allows the program

to choose among any number of alternatives you require, based on the value of a
single variable. It is greatly preferable to a series of nested If statements, because it
simplifies code maintenance, and also improves performance, because the variable
must be evaluated only once. For a full description, see the Siebel eScript Language
Reference.
Destroy any objects you have created when you no longer need them. Although the

system will eventually clean up objects, you can do so more efficiently than the
system. Moreover, in some instances, failure to clean up after yourself can create a
serious drain on performance and resources.
To destroy an object in Siebel eScript, set it to null, or set the variable containing it
to another value. The best practice is to destroy objects in the order opposite to the
order of creation. For example:
var oApplet = me;
var oBC = oApplet.BusComp;
[ Your code here ]
oBC = null;
oApplet = null;

1-30

Siebel Object Interfaces Reference

Version 6.0

Programming

Chapter Overview

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3

Siebel Object Interfaces

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5

Siebel COM Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6


Siebel ActiveX Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Siebel Java Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Siebel CORBA Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Built-In Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Usage Evaluation Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Object Types Exposed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Application Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16
Business Object Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Business Component Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
Business Service Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Applet Object Type

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18

Property Set Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19


User Interface Control Object Type

. . . . . . . . . . . . . . . . . . . . . . . . 2-19

Web Applet Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-20


Application Factory Object Type . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Summary of Object Types Exposed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Siebel Object Interface Method Syntax . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Interface Description Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Accessing Siebel COM Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Accessing the Siebel COM Data Server with C++ . . . . . . . . . . . . . . 2-26
Accessing Siebel ActiveX Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Accessing Siebel CORBA Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 2-41
Login Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41

Version 6.0

Siebel Object Interfaces Reference

2-1

Programming

The Connect String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42


Error-Handling Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-45
Getting Started with the Siebel Object Interfaces . . . . . . . . . . . . . . . . . 2-48
Instantiating the Siebel COM Automation Server . . . . . . . . . . . . . . . 2-48
Instantiating the Siebel COM Data Server . . . . . . . . . . . . . . . . . . . . 2-50
Instantiating the Siebel ActiveX Application Control . . . . . . . . . . . . 2-53
Accessing Siebel ActiveX Application Controls on a Thin Client
through JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-54
Instantiating the Siebel ActiveX Data Control . . . . . . . . . . . . . . . . . 2-55
Instantiating the Java Data Bean . . . . . . . . . . . . . . . . . . . . . . . . . . 2-57
Initializing ORB and Binding Siebel App Factory (Orbix) . . . . . . . . . 2-58
Initializing ORB and Binding Siebel App Factory (Visibroker)

. . . . . 2-60

Siebel Object Interface Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62


Locating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-63
Accessing Business Components . . . . . . . . . . . . . . . . . . . . . . . . . . 2-63
Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-69
User Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-69
Manipulating Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-70
Global State Properties and Functions . . . . . . . . . . . . . . . . . . . . . . 2-70
Creating a Siebel Application Object in CORBA

. . . . . . . . . . . . . . . 2-71

Variable Scoping for Siebel Script Variables . . . . . . . . . . . . . . . . . . . . 2-72


Inter-Application Variable Methods . . . . . . . . . . . . . . . . . . . . . . . . 2-74
Tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-74
Siebel Object Interface Events and Siebel Extension Events . . . . . . . . . 2-75
Event Method Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-75
How Your Script Affects Program Flow . . . . . . . . . . . . . . . . . . . . . 2-76
When Events Occur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80
Siebel Business Component Events . . . . . . . . . . . . . . . . . . . . . . . . 2-81
User Interface Control Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82

2-2

Siebel Object Interfaces Reference

Version 6.0

Programming
Chapter Overview

Chapter Overview

Siebel object interfaces provide robust, open interfaces into the Siebel applications,
supporting seamless integration between Siebel applications and external
applications.
Siebel object interfaces definitions are based on Siebel business objects and
declarative object definitions that can be configured and automatically upgraded to
successive releases using Siebel Tools, providing unparalleled ease of configuration
and maintenance.
Siebel object interfaces are available to developers through the following
technologies:

 Built-in scripting of Siebel objects using Siebel VB and Siebel eScript


 Component Object Model (COM) using the Siebel COM Automation and Siebel
COM Data Servers

 ActiveX using Siebel ActiveX Application Control and Siebel ActiveX


Data Control

 CORBA using Siebel CORBA Interfaces


 Java using Siebel Java Data Bean
Siebel developers can integrate client and server applications from a variety of
vendors. Application integration typically requires that cooperative software
application programs interactively pass data back and forth. In addition, application
integration sometimes requires that one application controls or automates
another application.

Version 6.0

Siebel Object Interfaces Reference

2-3

Programming
Chapter Overview

The Siebel object interfaces are a collection of methods on Siebel objects that
expose their data and functions to custom routines written in Siebel VB, Siebel
eScript, and also to other languages external to the Siebel application. The
interfaces provide access to Siebel business objects with defined methods, events,
and data.
Caution: Your Siebel application is a high-performance web-based or
client/server application specifically designed to meet the most
rigorous sales and marketing information requirements of large
multinational corporations. Use caution when extending the Siebel
applications or accessing them through the interface described here;
these things should be done only by trained technical professionals.
Improper application configuration or use of these interfaces can
cause your configured Siebel application to be less reliable, or to
perform poorly. Always test your configured application thoroughly
before production rollout.

Siebel Systems will not support the following:

 Functions developed through custom programming


 Custom-developed applications
 Specific performance characteristics of other vendors software
In addition, Siebel business objects, the Siebel object interfaces, and their
associated behavior and properties are defined at the sole discretion of Siebel
Systems, Inc. Siebel reserves the right to change the behavior, properties, and events
at any time without notice.
This chapter describes the interface environments and object types. Chapter 3,
Interfaces Reference, describes the supported methods of the Siebel object
interfaces and provides examples of how you can use them.

2-4

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interfaces

Siebel Object Interfaces

Siebel Object Interfaces provide:

 Siebel COM Interfaces


 Siebel ActiveX Interfaces
 Siebel CORBA Interfaces
 Siebel Java Interfaces
 Built-in scripting using Siebel VB and Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

2-5

Programming
Siebel Object Interfaces

Siebel COM Interfaces

Siebel COM object interfaces can be accessed in two distinct ways:

 From an external programming language, such as Microsoft Visual Basic or Java,


without displaying the Siebel user interface. This mode of operation is called the
Siebel COM Data Server. This interface can be used by any external application
accessing Siebel applications for both reading and writing data without having
to display Siebels user interface.
Figure 2-1 shows how the Siebel COM Data Server is used by external
applications without having to access the user interface objects.

External Application
COM Data Server
Applicaton Object Manager

Application
Business Component

Data Manager

Business Object

Siebel Database

Figure 2-1.

2-6

Using the Siebel COM Data Server

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interfaces

 From an external programming language, with display of the user interface. This
mode is called the Siebel COM Automation Server. This mode allows Siebel to
run as it normally does when a user invokes the standard Siebel application, and
provides access by external applications to the same Siebel objects through the
Siebel object interfaces. The Siebel COM Automation Server can be used for
controlling and testing a Siebel applications user interface objects and
underlying business objects from an external application.
Figure 2-2 shows how the Siebel COM Automation Server is used by external
applications to control the Siebel application.
Client
Siebel Application
Application

User Interface
External
Application

Applet

Application Object Manager

Business Component
Business Object

Data Manager

Control

Siebel Database

Figure 2-2.

Using the Siebel COM Automation Server

NOTE: The programming environment you use may impose limitations on the
functionality of COM servers. For example, code using the Data Server written in VB
should not be implemented as an NT service.

Version 6.0

Siebel Object Interfaces Reference

2-7

Programming
Siebel Object Interfaces

You can expect differences in performance between the Siebel COM Data Server and
the Siebel COM Automation Server. This is due in part to the fact that the Data
Server is a DLL running in the same address space as the calling program, while the
Automation Server is an executable that runs in its own address space.
You should also be aware that the COM Automation server will cause updates to the
user interface, which will affect performance. You can overcome this effect by using
the SuppressNotification method. See SuppressNotification on page 3-159
for details.

Siebel ActiveX Interfaces

The Siebel ActiveX interfaces enable external applications to access Siebel business
objects. Using ActiveX-based interfaces, accessing Siebel business objects can be
accomplished in the following ways:

 From an external programming language, such as Microsoft Visual Basic or


C++, without displaying the Siebel user interface. This is made available
through the Siebel ActiveX Data Control. Functional access is provided to the
Siebel application from an external program, without having to access or display
Siebel's user interface. This interface can be used by any external application
accessing Siebel applications for both reading and writing data.

 From an external programming language (such as Microsoft Visual Basic or


C++) but with Siebel display of the Siebel user interface. This is made available
through the Siebel ActiveX Application Control. This mode allows Siebel to run
as it normally does when a user invokes the standard Siebel application through
the Siebel ActiveX Thin Client, and provides access to the same Siebel objects
through the exposed interfaces and methods. With the ActiveX Application
Control, the Siebel user interface can be hosted in the same application. The
ActiveX Control can be used by applications that can host ActiveX Controls.
In order to run ActiveX Controls, you need to have a Siebel Application Object
Manager set up on a Siebel Server. (Refer to the Siebel Client Installation and
Administration Guide and the Siebel System Administration Guide for information
about installing and configuring the Siebel Application Object Manager.)

2-8

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interfaces

Any external application that uses the Siebel ActiveX interfaces will connect and
communicate with the Siebel Application Object Manager, which could be running
on a remote Siebel Server. Siebel Application Object Manager is a multi-threaded,
multi-process application server that hosts Siebel business objects and supports
session-based connections by clients.
Figure 2-3 shows how external applications use the ActiveX Application Control and
ActiveX Data Control to communicate with the Siebel application.
C lie nt

C lie n t
E x te rn a l A p p lic ation

E xte rn a l A p p lica tio n


S ieb e l U se r
In te rfa ce
A p p lica tio n C o n tro l

A p p lic ation
A pp le t
B u sine ss C o m p o n e nt
B u s in e ss O b je ct
C o n tro l

A p p lica tio n
B u sin e ss C o m p o n e n t
B u sin es s O b je ct

D ata C o n tro l

TCP/IP

S ie b e l O b je ct M an a g e r
A p p lic ation O b je ct
M an a g e r

S ie b e l S e rve r

D a ta M a n ag e r

S ieb e l D a tab a se

Figure 2-3.

Version 6.0

Using the Siebel ActiveX Application Control and Siebel ActiveX Data Control

Siebel Object Interfaces Reference

2-9

Programming
Siebel Object Interfaces

Siebel Java Interfaces

The Siebel Java Data Bean enables external applications to access Siebel objects
without having to display the Siebel user interface. These objects are made available
through the Siebel Java Data Bean, which can be used by an external application or
Java applet. The Java Data Bean provides functional access to the Siebel
applications for both reading and writing data. The set of interfaces exposed
through this interface is similar to that exposed by the Siebel ActiveX Data Control.
Any external application that uses the Siebel Java Data Bean will connect and
communicate with the Siebel Client Administration Manager, which could be
running on a remote Siebel Server. Siebel Client Administration Manager is a multithreaded, multi-process application server that hosts Siebel objects and supports
session-based connections by clients.

Using the Siebel Java Data Bean with Multiple Threads


Multiple threads of a single process should not access a common instance of the
Java Data Bean. If a process with multiple threads wishes to use the Data Bean,
each thread must create its own instance of it.
For the same reasons, you should not reuse instances of any other objects exposed
by the Java Data Bean (SiebelBusObject, SiebelBusComp, SiebelService, and
SiebelPropertySet) across multiple threads of the same process.
In short, you should create one instance of the Siebel Java Data Bean for each thread
that wishes to use it. Data Bean Objects obtained by one thread should not be
shared among multiple threads.

2-10

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interfaces

Siebel CORBA Interfaces

Siebel CORBA interfaces enable external applications to access Siebel business


objects through CORBA using Inprise's Visibroker or Iona's Orbix ORB. (Please see
Siebel System Requirements and Supported Platforms for information on the correct
version to use.) The set of interfaces exposed through CORBA is similar to the Siebel
ActiveX Data Control and Siebel COM Data Server interfaces. External applications
access the Siebel business objects through CORBA. This interface can be used by
any external application accessing Siebel applications for both reading and writing
data without having to display Siebels user interface.
For external applications to communicate with Siebel applications, the Siebel
CORBA Object Manager must be installed. A typical setup for a CORBA client
accessing the Siebel CORBA Interfaces is shown in Figure 2-4.

ORB (Object Request Broker)

S ie b e l C O R B A O b je ct M a n a g e r
C O R B A In te rfa ce
A p p lica tio n
O b je ct M a n a g e r

C O R B A C lie n t
A p p lica tio n
A p p lica tio n F a cto ry
B u sin e ss C o m p o n e n t
B u sin e ss O b je ct

D a ta M a n a g e r

S ie b e l D a ta b a se

Figure 2-4.

Version 6.0

The CORBA Client Accessing the Siebel CORBA Object Manager

Siebel Object Interfaces Reference

2-11

Programming
Siebel Object Interfaces

To set up the CORBA Object Manager


1 Install the version of the CORBA Object Manager appropriate to the version of
the Siebel application you are using. In Windows Explorer, navigate to the
\CORBAOM directory on the Siebel CD-ROM. The detailed installation process is
documented in the Siebel Client Installation and Administration Guide.
2 Before starting the CORBA Object Manager, ensure that the customized Siebel
repository file has been copied to the objects subdirectory of each Siebel
installation that will use the CORBA Object Manager (by default, this is
C:\Siebel\objects).
3 Install the supported ORB software (Orbix or Visibroker) to be used with the
Object Manager on each Application Server.
4 Add the CORBA and sieb60\bin directories to the computers PATH
environment variable.
In Windows NT:

a Choose Start

 Settings  Control Panel  System  Environment.

b Select the Path environment variable in the System Variables window, as


shown.

2-12

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interfaces

c To the end of the value in the Value field, add the following:
;C:\Siebel;C:\sieb60\bin;C:\CORBAOM
If these are not the names you used for the indicated directories, change the
text to reflect whats on the hard drive.

d Click OK.
In Windows 95 or 98:

a Choose Start

 Run.

b Enter sysedit in the Open field.


c In the AUTOEXEC.BAT file, search for the PATH statement. If there is none,
add a line of the following form:
PATH C:\Siebel;C:\sieb60\bin;C:\CORBAOM
If there is a line beginning with PATH, add the following to the end of it:
;C:\Siebel;C:\sieb60\bin;C:\CORBAOM
If these are not the names you used for the indicated directories, change the
text to reflect whats on the hard drive.

d Save and close the file.


e Reboot the computer.
5 Start the Daemon process. For details on this, refer to the Setting Up the ORB
section in the Siebel Client Installation and Administration Guide.
6 Before starting the CORBA Object Manager for the first time on an Application
Server, register the CORBA Object Manager with the ORB. The registration
process will depend on the type of ORB. The detailed steps for completing the
process are documented in the Siebel Client Installation and Administration
Guide.
7 Start the CORBA Object Manager, which is located in the C:\CORBAOM\bin
directory (or of whatever directory you installed the CORBA Object Manager to).
If you are using the Visibroker ORB, the executable is ssomvisi.exe. If you
are using ORB, it is ssomorbx.exe.

Version 6.0

Siebel Object Interfaces Reference

2-13

Programming
Siebel Object Interfaces

Built-In Scripting

You can access Siebel methods and events from within the Siebel application
through Siebel VB or Siebel eScript. Both languages are complete procedural
programming languages that allow you to write custom extensions that access and
control Siebel objects via the Siebel object interfaces.

Usage Evaluation Matrix

Table 2-1 is intended to help you determine which types of Siebel object interfaces
to use.
Table 2-1.

Usage Evaluation
Siebel COM
Automation
Server

Usage

Siebel COM
Data Server

Siebel CORBA
Interfaces

Objects execute on a
Siebel Server

Execute on the Siebel


CORBA Object
Manager

2-14

Siebel Java
Data Bean

(if hosted)

Access Siebel
business objects
without Siebel user
interface

Execute on the client


side in mobile
environments

Siebel ActiveX
Data Control

Host Siebel user


interface in your
external application
Control Siebel user
interface from your
external application

Siebel ActiveX
Application
Control

Siebel Object Interfaces Reference

Version 6.0

Programming
Object Types Exposed

Object Types Exposed

Siebel object interfaces provide access to Siebel business objects. The exposed types
of objects are:

 Application Object Type on page 2-16


 Business Object Object Type on page 2-16
 Business Component Object Type on page 2-17
 Business Service Object Type on page 2-17
 Applet Object Type on page 2-18
 Property Set Object Type on page 2-19
 User Interface Control Object Type on page 2-19
 Web Applet Object Type on page 2-20
 Application Factory Object Type on page 2-20
In addition to these types, other object types are used in Siebel, as well as
specialized types that are derived from the base object types. Object types not
specifically discussed here are not exposed in the Siebel object interfaces.
NOTE: These interfaces may be subject to change in the future.

Version 6.0

Siebel Object Interfaces Reference

2-15

Programming
Object Types Exposed

Application Object Type

The application object represents the Siebel application that is currently active and
is an instance of the Application object type. An application object is created when
a Siebel software application is started. This object contains the properties and
events that interact with Siebel software as a whole. An instance of a Siebel
application always has exactly one application object.
Siebel Application Control and Siebel Data Control are the names of the Application
Objects available through the Siebel ActiveX Application Control and Siebel ActiveX
Data Control, respectively.
NOTE: The Siebel Application Control and Siebel Data Control are provided in the

same type library.

Business Object Object Type

Business objects are highly customizable, object-oriented building blocks of Siebel


applications. Business objects define the relationships between different business
component objects (BusComps) and contain semantic information about, for
example, sales, marketing, and service-related entities.
A Siebel business object groups one or more business components into a logical unit
of information. Examples of Siebel business objects include Opportunity, Quote,
Campaign, and Forecast. An opportunity business object may consist of
opportunity, contact, and product business components, with the opportunity
business component dictating the information of the other business components
in a parent-child relationship. This object type is available to all interfaces.

2-16

Siebel Object Interfaces Reference

Version 6.0

Programming
Object Types Exposed

Business Component Object Type

A business component defines the structure, the behavior, and the information
displayed by a particular subject such as a product, contact, or account. Siebel
business components are logical abstractions of one or more database tables. The
information stored in a business component is usually specific to a particular
subject and is typically not dependent on other business components. Business
components can be used in one or more business objects.
Business component objects have associated data structured as records, they have
properties, and they contain data units called fields. In the object interfaces, fields
are accessed through business components. The business component object
supports getting and setting field values, moving backward and forward through
data in a business component object, and filtering changes to data it manages. This
object type is available to all interfaces.

Business Service Object Type

Business service objects are objects that can be used to implement reusable
business logic within the Object Manager and the Siebel dedicated client. They
include:

 Built-in business services, which are defined in Siebel Tools and stored in the
repository

 Run-time business services, which are defined in the run-time client and stored
in the application database.
There are two types of built-in business services:

 Standard, which are based on the class CSSService and can be scripted or
modified.

 Specialized, which are based on a specialized C++ class. Those specialized


services whose behavior has been documented can be scripted.
Using business services, you can configure stand-alone objects or modules with
both properties and scripts (written in VB or eScript). Business Services may be
used for generic code libraries that can be called from any other scripts. The code
attached to a menu item or a toolbar button may be implemented as a business
service.

Version 6.0

Siebel Object Interfaces Reference

2-17

Programming
Object Types Exposed

Built-in services cannot be modified at run time, nor can they be overridden by runtime scripts.
User-created services can be created by adding a new record to the Business Service
list applet in Siebel Tools. They can also be defined by administrators at run time
by using views in the Siebel client. They can have whatever properties are needed
to accomplish a particular task. They can be called either from scripts or from object
interfaces.
Because they are reusable and can be set to persist throughout a session, business
service objects can be used to simulate global procedures.

Applet Object Type

An applet is a program designed to be executed from within another application and


contains one or more user interface objects. An applet serves as a container for the
collection of user interface objects that together represent the visible representation
of one business component (BusComp) object. Applets are combined to form views.
Views constitute the display portions of a Siebel application. Applets occupy nonoverlapping, contiguous subsets of the visible area of the display (below the thread
bar and above the status line). Since applet objects are part of the user interface,
they are not accessible when using the Siebel object interfaces through the Siebel
COM Data Server, Siebel ActiveX Data Control, the Siebel Java Data Bean, and the
Siebel CORBA Object Manager.
An instance of an applet object is created for each applet during the time it is visible
until navigation removes it from the display. Only applets that are currently visible
are returned by the location methods of the Siebel object interfaces. Applets contain
control objects that are individual user interface controls such as buttons and
text boxes.

2-18

Siebel Object Interfaces Reference

Version 6.0

Programming
Object Types Exposed

Property Set Object Type

Property set objects are collections of properties, which can be used for storing data.
They may have child property sets assigned to them to form a hierarchical data
structure. Property sets are used primarily for inputs and outputs to business
services.

User Interface Control Object Type

A user interface control object, or simply a control, is a visual object with which
the user can directly interact, such as a button or text box. Control objects have
properties that can be accessed by Siebel object interfaces. Since control objects are
part of the user interface, they are not accessible through the Siebel COM Data
Server, Siebel ActiveX Data Control, and the Siebel CORBA Object Manager.
Controls are the visible building blocks of applets. Each control exists only in a
single applet; that is, each control is unique. Only controls on the active (currently
visible) applet are available to Siebel object interfaces. Each control has a unique
name within its containing applet, but control names need not be unique across
all applets.
The control object supports getting and setting values and customized behavior
when used in conjunction with Siebel object interfaces.

Version 6.0

Siebel Object Interfaces Reference

2-19

Programming
Object Types Exposed

Web Applet Object Type

A Web applet represents an applet that is rendered in a .COM application by the


Siebel Web Engine. It exists only as a scriptable object, and is accessed by using the
Edit Web Scripts command on the selected applet. Web applet objects are accessible
only though Siebel VB and Siebel eScript. Because applet events and methods are
not supported in the Siebel Web Engine, the Web applet interfaces are available in
their place.

To add a script to an applet used by a .COM application in Siebel Tools


1 In the Explorer window, choose the Applet object type.
2 In the right pane, locate the object to which you want to add a script.
3 Ensure that the project containing the Web applet is locked.
4 Right-click the item and select Edit Web Scripts.

Application Factory Object Type

Supported only in Siebel CORBA Object Manager Interfaces, the Siebel Application
Factory object is the externally visible object. To access the other objects, a bind to
the Siebel Application Factory object has to be made.

2-20

Siebel Object Interfaces Reference

Version 6.0

Programming
Object Types Exposed

Summary of Object Types Exposed

Table 2-2 summarizes the names and types of objects exposed.


Table 2-2.

Exposed Object Types for Each Siebel Object Interface

Object
Type

Siebel COM
Automation
Server

Applet

SiebelApplet

Application

SiebelApplication

Siebel COM
Data Server

Siebel ActiveX
Application
Control

Siebel ActiveX
Data Control

Siebel Java
Data Bean

Siebel CORBA
Interfaces

SiebelDataControl

SiebelDataControl

SiebelApplication

SiebelApplet
SiebelApplication

SiebelApplication
Control

Application
Factory

SiebelAppFactory

Business
Component

SiebelBusComp

SiebelBusComp

SiebelBusComp

SiebelBusComp

SiebelBusComp

SiebelBusComp

Business
Object

SiebelBusObject

SiebelBusObject

SiebelBusObject

SiebelBusObject

SiebelBusObject

SiebelBusObject

Business
Service

SiebelService

SiebelService

SiebelService

SiebelService

SiebelService

SiebelService

Property
Set

SiebelPropertySet

SiebelPropertySet

SiebelPropertySet

SiebelPropertySet

SiebelPropertySet

SiebelPropertySet

User
Interface
Control

SiebelControl

Version 6.0

SiebelControl

Siebel Object Interfaces Reference

2-21

Programming
Siebel Object Interface Method Syntax

Siebel Object Interface Method Syntax

The ActiveX, Java, and CORBA syntax is very similar to that of COM, with the
exception of login, object type names, and error handling.

Interface Description Conventions

The following conventions are used in this guide to describe methods, arguments,
and return values:
ObjectType.MethodName(arg1[, arg2, ..., argn])

Syntax

Returns

Argument

Description

arg1

Description of arg1

arg2

Description of arg2

argn

Description of argn

Description of the value returned by the method, if any.


The following conventions are used in the syntax diagram:

 ObjectType is the object type, for example BusComp (business component),


for which the method is defined.

 MethodName is the name of the method that is being invoked. A method can
be a subroutine that does not return a value, such as SetViewMode, or a function
that returns a value, such as GetFieldValue.

 arg1, arg2 can be a string, constant, integer, or object. If a method returns a


value, the arguments must be enclosed in parentheses in Siebel VB. (All
arguments must be enclosed in parentheses in Siebel eScript.)

 Brackets [ ] indicate an optional parameter. In the description of the argument,


the default value for the optional parameter is indicated.

2-22

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

If a method does not return a value or if you are using it in a manner that does not
return a value, then the arguments should not be enclosed in parentheses in Siebel
VB. (In Siebel eScript, all arguments must be enclosed in parentheses.)
When the Siebel object interfaces are used through COM, an additional argument,
errCode, is always included as the last argument.
Usage
Syntax

The usage syntax for a method is different under Siebel VB, Siebel eScript, and COM
and is described below. The description uses the following terms in addition to the
ones defined above:

 ObjectReference is a variable name of type ObjectType that points to the


object on which the method is invoked.
NOTE: You do not need to explicitly specify an ObjectReference when invoking a

method on an object inside its event handler.

 returnValue is the value, if any, that is returned by the method. Some


methods, such as GetBusComp, return an object of the type business
component. Other methods return strings or integers.

Siebel VB
If there is a return value,
returnValue = ObjectReference.MethodName(arg1, arg2, ..., argn)

If there are no arguments,


returnValue = ObjectReference.MethodName

If there is no return value,


ObjectReference.MethodName arg1, arg2, ..., argn

Examples

acctName = acctBC.GetFieldValue("Name")
acctBC = acctApplet.GetBusComp
acctBC.SetViewMode AllView

Version 6.0

Siebel Object Interfaces Reference

2-23

Programming
Siebel Object Interface Method Syntax

Siebel eScript
If there is a return value,
returnValue = ObjectReference.MethodName(arg1, arg2, ..., argn);

If there are no arguments,


returnValue = ObjectReference.MethodName();

If there is no return value,


ObjectReference.MethodName(arg1, arg2, ..., argn);

Examples

acctName = acctBC.GetFieldValue("Name");
acctBC = acctApplet.GetBusComp();
acctBC.SetViewMode(AllView);

COM
The usage depends on the language being used to call the COM Interfaces. For
Microsoft Visual Basic and equivalent languages, the usage is similar to that for
Siebel VB, except for the fact that an error code is passed as the final argument.

2-24

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

Accessing Siebel COM Interfaces

To use the Siebel COM interfaces, you must set the EnableOLEAutomation flag in
the .cfg file to TRUE. For Siebel Interface methods through COM, use the object
browser of your COM programming tool to determine the correct method syntax.
Figure 2-5 displays an example of an object browser in Microsoft Visual Basic 5.0.

Syntax window

Figure 2-5.

Version 6.0

Determining Correct COM Syntax in Microsoft Visual Basic

Siebel Object Interfaces Reference

2-25

Programming
Siebel Object Interface Method Syntax

Accessing the Siebel COM Data Server with C++

This section presents a series of steps to build a simple COM client in Visual C++
and the Microsoft Foundation Class (MFC) library, which accesses the Siebel Data
Server. This will allow you to build real-time interfaces to Siebel using C++ for
integration purposes.

To build the Siebel COM client in C++


1 In Microsoft Visual C++, choose File

 New  Project.

2 Select the MFC AppWizard (exe) project type.

3 Enter SiebelCOM in the Project name field, and click OK.


The MFC AppWizard starts.

2-26

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

4 Select the Dialog based option and click Next.


5 Under the question, What other support would you like to include? select
Automation and deselect ActiveX Controls. Click Next. Click Next again.

Version 6.0

Siebel Object Interfaces Reference

2-27

Programming
Siebel Object Interface Method Syntax

6 Click Finish. You will be presented with a Project Information dialog box, as
shown. Click OK.
The Application Wizard generates the standard MFC code that will serve as the
skeleton for this project. All headers and libraries necessary to support COM
automation will be included. (Refer to the Microsoft Visual Studio [MSDN]
documentation for a detailed description of the MFC libraries.)

2-28

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

7 You will see the workspace with a newly created dialog box. You can resize the
box and change the text in the label by editing its properties. (Right-click the
label in the dialog box to edit its properties.) Modify the dialog box so that it
looks something like this:

Version 6.0

Siebel Object Interfaces Reference

2-29

Programming
Siebel Object Interface Method Syntax

8 Choose View ClassWizard


type library

 Automation. Click Add Class, then click From a

9 Navigate to the C:\Sieb60\bin directory. Choose sobjsrv.tlb.

10 In the Confirm Classes dialog box, make sure all five Siebel classes are selected,
and click OK. Click OK again to close the Class Wizard.

2-30

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

11 Add code to communicate with the Siebel COM Server.


a In the workspace window, click the FileView tab.

FileView tab

Version 6.0

Siebel Object Interfaces Reference

2-31

Programming
Siebel Object Interface Method Syntax

b Expand the Source Files and Header Files folders, as shown.

2-32

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

c Double-click the SiebelCOMDlg.h file.


The code window opens, as shown.

d Enter the code that is highlighted in boldface in Figure 2-6 on page 2-34 into
the SiebelCOMDlg.h file.

e Choose File Open and select the SiebelCOMDlg.cpp file. Add the code
that is highlighted in boldface in Figure 2-7 on page 2-35 to the
OnInitDialog procedure.

Version 6.0

Siebel Object Interfaces Reference

2-33

Programming
Siebel Object Interface Method Syntax

In the same file, Add the code that is highlighted in boldface in Figure 2-8 on
page 2-36 and Figure 2-9 on page 2-37 to the OnOKDialog procedure. Make sure
that the line beginning with sApp.LoadObjects points to the location of the .cfg
file you intend to use. In the line beginning with sApp.Login, make sure that you
have entered a valid logon name and password.
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "sobjsrv.h"

//include Siebel wrapper classes

class CSiebelCOMDlgAutoProxy;
//////////////////////////////////////////////////////////////
// CSiebelCOMDlg dialog
class CSiebelCOMDlg : public CDialog{
DECLARE_DYNAMIC(CSiebelCOMDlg);
friend class CSiebelCOMDlgAutoProxy;
SiebelApplication sApp;
//declare Siebel object
// Construction
public:
CSiebelCOMDlg(CWnd* pParent = NULL);// standard constructor
virtual ~CSiebelCOMDlg();

Figure 2-6.

2-34

Code for SiebelCOMDlg.h

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this
// automatically when the application's main window
// is not a dialog
SetIcon(m_hIcon, TRUE);
// Set big icon
SetIcon(m_hIcon, FALSE);
// Set small icon
// TODO: Add extra initialization here
// Start the Siebel Data Server
if (!sApp.CreateDispatch(_T("SiebelDataServer.ApplicationObject")))
{
AfxMessageBox("Cannot start Siebel Data Server.");
EndDialog(-1); //fail
} else
{
AfxMessageBox("Siebel Data Server initialized.");
}
return TRUE;

// return TRUE

unless you set the focus to a control

Figure 2-7.

Version 6.0

Code to be Added to OnInitDialog Routine in SiebelCOMDlg.cpp

Siebel Object Interfaces Reference

2-35

Programming
Siebel Object Interface Method Syntax

short sErr;
//Load Configuration File
// Make sure that The following line points to the configuration
// file you intend to use!
sApp.LoadObjects("C:\\siebel\\bin\\siebel.cfg", &sErr);
if(sErr)
{
AfxMessageBox("LoadObjects failed.");
return;
} else
{
AfxMessageBox("CFG file loaded.");
}
//Login as Sadmin
sApp.Login("SADMIN", "SADMIN", &sErr);
if (sErr)
{
AfxMessageBox("Login failed.");
return;
} else
{
AfxMessageBox("Logged into Siebel database.");
}
//Get Account BusObject
LPDISPATCH lpdBo;
lpdBo = sApp.GetBusObject("Account", &sErr);
if (sErr)
{
AfxMessageBox("GetBusObject failed.");
return;
} else
{
AfxMessageBox("Account BusObject retrieved.");
}
SiebelBusObject Bo(lpdBo);

Figure 2-8.

2-36

Code to be Added to OnOKDialog Routine in SiebelCOMDlg.cpp

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

//Get Account BusComp


LPDISPATCH lpdBc;
lpdBc = Bo.GetBusComp("Account", &sErr);
if (sErr)
{
AfxMessageBox("GetBusComp failed.");
return;
} else
{
AfxMessageBox("Account BusComp retrieved.");
}
SiebelBusComp Bc(lpdBc);
//Get the name of the first account
Bc.ActivateField("Name", &sErr);
if (sErr) return;
Bc.ClearToQuery(&sErr);
if (sErr) return;
Bc.SetSearchSpec("Name","*",&sErr);
if (sErr) return;
Bc.ExecuteQuery(0,&sErr);
if (sErr) return;
Bc.FirstRecord(&sErr);
if (sErr) return;
//Display the account name in a message box
CString csAcctName;
csAcctName = Bc.GetFieldValue("Name", &sErr);
AfxMessageBox(csAcctName);
return;
if (CanExit())
CDialog::OnOK();
}

Figure 2-9.

Version 6.0

Code to be Added to OnOKDialog Routine in SiebelCOMDlg.cpp, continued

Siebel Object Interfaces Reference

2-37

Programming
Siebel Object Interface Method Syntax

Once you have finished creating your program, you must test it to ensure that it
works properly.

To test your program


1 Start your Siebel client application using the same .cfg file and login parameters
you specified in the code.



2 Choose Screens Accounts


All Accounts. Verify that there is at least one
account visible in the Account list applet. If there is not, create one. Exit the
Siebel client.
3 Open the .cfg file you specified in the code and make sure that the DataSource
key indicates the database source you specified at logon in Step 2.

4 In Microsoft Visual C++, choose Build Build SiebelCOM.exe, or press F7. If


there are any errors or warnings reported in the output window, correct the
errors and repeat this step.
5 Choose Build

 Execute SiebelCOM.exe, or press F5.

A message box should display the message Siebel Data Server initialized.

6 Click OK. You should see your customized dialog box.

7 You should see a series of message boxes, with the following messages:
a CFG file loaded.
b Logged into Siebel database.
c Account BusObject retrieved.
d Account BusComp retrieved.
e The name of the first account in the All Accounts view.

2-38

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

Accessing Siebel ActiveX Interfaces

For Siebel Interface methods through ActiveX, use the object browser of your
ActiveX programming tool to determine the correct method syntax. Figure 2-10
displays an example of an object browser using Microsoft Visual Basic 6.0.
Syntax window

Figure 2-10. Determining the Correct Syntax for ActiveX Interfaces in Microsoft Visual Basic

Version 6.0

Siebel Object Interfaces Reference

2-39

Programming
Siebel Object Interface Method Syntax

To set up Microsoft Visual Basic to access the Siebel ActiveX Interfaces


1 Be sure you have installed a thin client. This can be found in the Windows client
directory. It automatically installs the required DLLs.
2 Start Microsoft Visual Basic.
3 Select Standard EXE.
4 Choose Project

 References.

5 In the list box, highlight (but do not check) Siebel BusObject Interfaces Type
Library. Near the bottom of the dialog box, note the directory in which the file
sstchca.dll resides, as shown below. (It should be the C:\Program
Files\Siebel\tclient\bin directory subsidiary to the thin client install
directory.)

6 If the location is the same as that of the .cfg file, check the box and click OK.
If the location is not the same, proceed to Step 7.

7 In the Windows Explorer, open the directory containing the .cfg file to use. By
default, the .cfg files should be in the bin directory.
8 Double-click the file sstchca.dll. Repeat Step 5 and Step 6.
9 Open the Object Browser, as shown in Figure 2-10 on page 2-39, to verify that
you can see the Siebel objects.

2-40

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

Accessing Siebel CORBA Interfaces

To access the CORBA Object Manager, EnableCORBA must be set to TRUE in


your .cfg file.
Siebel CORBA Interface syntax is very similar to the Siebel ActiveX and Siebel
COM Interface syntax.

Login Method
The syntax of the Login method is the same as that explained in Login Differences
on page 2-41.

Error Handling
See Error-Handling Differences on page 2-45 for information concerning CORBA
error handling.
Automation Server and Data Server, all parameters, including optional ones if they
are being used, must be specified.

Login Differences

COM Automation Server. The Siebel COM Automation Server does not support login,
since it connects to the existing Siebel application.

See Table 2-3 on page 2-43 for appropriate substitutions.


Other interfaces. The Login method is used with Siebel COM Data Server, ActiveX

Application Control, ActiveX Data Control, Java Data Bean, and CORBA Object
Manager.
The Login method that is available through the ActiveX Application Control and
Data Control and CORBA objects has a different syntax from those in the Siebel
COM interfaces. It takes three parameters:

 Connect string (token-based)


 Login name
 Password

Version 6.0

Siebel Object Interfaces Reference

2-41

Programming
Siebel Object Interface Method Syntax

The general form for the Login method is as follows:


Login(connString As String, username As String, password As
String)

The method returns TRUE if login is successful, FALSE if it is not.

The Connect String

The connect string is a URL containing all the information needed to connect to any
Siebel Server component. It specifies both the protocol and the details of the Client
Application Manager service in the Siebel Servers to which the client will connect.
The generic form of the syntax for the connect string is:
siebel[[.transport][.[encryption][.[compression]]]]://
host[:port]/EnterpriseServer/AppObjMgr[/SiebelServer]

Here is an example of a connect string:


SiebelApplication.Login "host=""siebel//:host/EnterpriseServer/
AppObjMgr/SiebelServer""", "CCONWAY", "CCONWAY"

Note that the entire protocol string is optional. You may specify the transport
protocol alone, separating it from siebel with a single period; however, if you
specify any of the other protocols, a period must be used as a placeholder for each
protocol not specified, for example:
siebel...pkware://host/siebel/AppObjMgr

Protocols that are not specified receive their default values, as shown in Table 2-3
on page 2-43.

2-42

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

Make the following substitutions for the placeholders in the example:


Table 2-3.

Substitutions When Logging into a Siebel Server

In Place Of

Insert

transport

One of the following values:

(Sheet 1 of 2)

 tcpip (the default)


 http
encryption

One of the following values:

 none (the default)


 mscrypto
compression

One of the following values:

 none
 zlib (the default)
 pkware
loadbalanced

One of the following values:

 true (the default)


 false

Version 6.0

host

The name of the computer on which the gateway server is installed

port

The gateway port; by default 2320. This will change only if the Siebel
Adminster has changed the default during installation

EnterpriseServer

The name of the Siebel Enterprise Server

Siebel Object Interfaces Reference

2-43

Programming
Siebel Object Interface Method Syntax

Table 2-3.

Substitutions When Logging into a Siebel Server

(Sheet 2 of 2)

In Place Of

Insert

AppObjMgr

The name of the defined Application Object Manager that you want the
thin client to access; this can be a user-defined component or one of
these predefined components:

 SCCObjMgr
 SSEObjMgr
 ISSObjMgr
 SSVObjMgr
(For more information, see the Siebel System Administration Guide.)
SiebelServer

The Siebel Server to which the thin client should connect


Note that this value should not be specified if Resonate is being used,
because the Resonate Server will dynamically choose the Siebel Server
with the lowest utilization.

See Login on page 3-70 for more detailed information about this method.

2-44

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

Error-Handling Differences

The Siebel ActiveX Interfaces error handling differences are explained in


this section.

COM Error Handling


The errCode parameter is the standard last parameter for all the COM interface
methods. It is not available in the ActiveX and CORBA methods. An example
of this is the GetBusObject method that is available in the COM interfaces
(SiebelApplication) as well as the ActiveX interfaces (SiebelApplicationControl
and SiebelDataControl). The difference between the two methods is shown below:

Error Handling ExampleCOM


GetBusObject (BusObjectName as string, errcode as integer) ->
businessObject

Error Handling ExampleActiveX


GetBusObject (BusObjectName as string) -> businessObject

Java Error Handling


The Siebel Java Interfaces error-handling differences are explained in this section.
All errors in the Siebel Java Data Bean are handled by the SiebelException object.
It supports the getErrorCode() and getErrorMessage() methods. The
SiebelException object is defined in com.siebel.common.common.SiebelException.

Version 6.0

Siebel Object Interfaces Reference

2-45

Programming
Siebel Object Interface Method Syntax

It is used as follows:
...
import com.siebel.common.common.SiebelException;
...
try
{
// do any operations that can raise the SiebelException
exception
SiebelDataControl m_dataControl = new SiebelDataControl ();
m_dataControl.login ("SOMSERVER, somsiebel, AppObjMgr,
SOMSERVER", "CCONWAY", "CCONWAY");
}
{
.
.
.
}
catch (SiebelException e)
{
// any errors in the preceding try block are handled here
System.out.println (e.getErrorMessage ());
}

Error Message Tracking


For error message tracking in ActiveX and CORBA, you can use either exceptions
or methods. The following methods are available:

 EnableExceptions (ActiveX only)


 GetLastErrCode (CORBA and ActiveX only)
 GetLastErrText (COM, CORBA, and ActiveX)

2-46

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Method Syntax

EnableExceptions Method
EnableExceptions(enable as integer)

The EnableExceptions method enables applications to use the native COM errorhandling technique. If the method is about to fail due to error, then a COM exception
will be generated and the method will not return. The COM host will receive the
control instead. However, it may display the error message (this is default for
Microsoft Internet Explorer or VB), but it can be changed by scripting.

GetLastErrCode, GetLastErrText Method


After execution of a method, the GetLastErrCode can be invoked to check if any
error was returned from the previous operation. The GetLastErrText method can be
invoked to retrieve the text of the error message.
GetLastErrCode() ' retrieves errCode As Integer
GetLastErrText() ' retrieves text As String

CORBA Exception Handling


All CORBA Object methods except for those noted on the reference page as
implemented as an attribute raise a SiebelException. The following code example
illustrates how to handle CORBA exceptions where excep.id is the exception code
(or id) and excep.desc is the exception description.
SiebelAppFactory_var appFact;
SiebelApplication_var appObj;
try {
appObj = appFact->CreateSiebelAppObject();
} catch (const SiebelException& seblExcep) {
cerr << "Error id
: " << seblExcep.id << endl;
cerr << "Error text : " << endl;
cerr << seblExcep.desc << endl;
return;
}

Version 6.0

Siebel Object Interfaces Reference

2-47

Programming
Getting Started with the Siebel Object Interfaces

Getting Started with the Siebel Object Interfaces

Directions follow for connecting to the COM Servers, ActiveX Controls, or ORBs:

 Instantiating the Siebel COM Automation Server on page 2-48


 Instantiating the Siebel COM Data Server on page 2-50
 Instantiating the Siebel ActiveX Application Control on page 2-53
 Instantiating the Siebel ActiveX Data Control on page 2-55
 Initializing ORB and Binding Siebel App Factory (Orbix) on page 2-58
 Initializing ORB and Binding Siebel App Factory (Visibroker) on page 2-60

Instantiating the Siebel COM Automation Server

The Siebel COM Automation Server accesses the server object instantiated by the
Siebel eBusiness Application. Once you have this object, you can obtain other Siebel
objects and execute Siebel object interface methods through those objects. Calls
made to the Siebel COM Automation Server are out of process. If you create a DLL
that is run in process with the Siebel application, the calls made from the DLL to
the Siebel COM Automation Server are still out of process.
The mechanism for instantiating COM servers depends on the programming tool or
language being used.
If you are using Microsoft Visual Basic 5.0 or later, the required support file must
be in the same directory as the .cfg file you are using for your Siebel application, or
the COM Automation Server will not work. Take the following steps to ensure that
you are referencing the correct library.

To set up Microsoft Visual Basic to access the Siebel COM


Automation Server
1 Start Microsoft Visual Basic.
2 Select Standard EXE.
3 Choose Project

2-48

 References.

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

4 In the list box, highlight (but do not check) Siebel BusObject Interfaces. Near the
bottom of the dialog box, note the directory in which the file sappsrv.tlb
resides, as shown below.

5 If the location is the same as that of the .cfg file, check the box and click OK.
If the location is not the same, proceed to Step 6.

6 In Windows Explorer, open the directory containing the .cfg file to use. By
default, the .cfg files should be in the bin directory.
7 Double-click the file sapptlb.reg. Repeat Step 4 and Step 5.
Caution: Do not attempt to use sobjsrv.tlb together with

sappsrv.tlb unless you qualify the application data type with


SiebelAppServer and SiebelDataServer.

Version 6.0

Siebel Object Interfaces Reference

2-49

Programming
Getting Started with the Siebel Object Interfaces

The following examples show how to use Microsoft Visual Basic 6.0 to interface
with Siebel COM Automation Server.
The following is sample code for the Siebel COM Automation Server:
Private Sub SiebAppServ_Click()
Dim SiebelApp As Object
Dim CurrentBC As Object
Dim theName As String
Dim errCode As Integer
Set SiebelApp = GetObject("", _
"SiebelAppServer.ApplicationObject")
theName = SiebelApp.LoginName(errCode)
MsgBox "You are logged in as " & theName
Set CurrentBC = SiebelApp.ActiveBusComp(errCode)
If Not CurrentBC Is Nothing Then
MsgBox "The current active Business Component is " & _
CurrentBC.Name(errCode)
End If
End Sub

Instantiating the Siebel COM Data Server

Because the Siebel COM Data Server acts without the regular Siebel eBusiness
Application User Interface, you must use the Login method to set up your Data
Server object. Also, you cannot use methods that retrieve active Siebel objects,
because there are no current active Siebel objects. You must instantiate your own
Siebel objects. Calls made to the Siebel COM Data Server are in process.
Caution: Any variables that are set in the Application_Start event
will not be available to methods invoked by the COM Data Server,
because when you run a COM Data Server, no Siebel client exists.
Therefore, the Application_Start event is never invoked.

You can place logic in your Siebel VB scripts to identify whether


events are invoked within a Siebel application or a COM Data
Server. Use the SetSharedGlobal method at the beginning of your
COM program and use GetSharedGlobal within each VB script to
determine what application has invoked the script.

2-50

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

If you are using Microsoft Visual Basic 5.0 or later, the required support file,
sobjsrv.tlb, must be in the same directory as the .cfg file you are using for your
Siebel application, or the COM Data Server will not work. Take the following steps
to ensure that you are referencing the correct library.

To set up Microsoft Visual Basic to access the Siebel COM Data Server
1 Start Microsoft Visual Basic.
2 Select Standard EXE.
3 Choose Project

 References.

4 In the list box, highlight (but do not check) Siebel Data BusObject Interfaces.
Near the bottom of the dialog box, note the directory in which the file sobjsrv.tlb
resides, as shown below.

5 If the location is the same as that of the .cfg file, check the box and click OK.
If the location is not the same, proceed to Step 6.

Version 6.0

Siebel Object Interfaces Reference

2-51

Programming
Getting Started with the Siebel Object Interfaces

6 In Windows Explorer, open the directory containing the .cfg file to use. By
default, the .cfg files should be in the bin directory.
7 Double-click the file sobjtlb.reg. Repeat Step 4 on page 2-51 and Step 5 on
page 2-51.
Caution: Do not attempt to use sobjsrv.tlb together with

sappsrv.tlb unless you qualify the application data type with


SiebelAppServer and SiebelDataServer.
The following is sample code for the Siebel COM Data Server. Ensure that the
DataSource parameter in the .cfg file is set to the database to which you want to
connect.
NOTE: This code must be written and executed outside of Siebel Tools, for example

in Microsoft Visual Basic.


Sub CreateDataServer()
Dim errCode As Integer
ChDrive "C"
ChDir "C:\sieb60\bin"
Set SiebelApplication = _
CreateObject("SiebelDataServer.ApplicationObject")
With SiebelApplication
.LoadObjects "C:\sieb60\bin\siebel.cfg", errCode
If errCode <> 0 Then
ErrText = .GetLastErrText
MsgBox ErrText
Exit Sub
End If
.Login "HALACON", "HALACON", errCode
If errCode <> 0 Then
ErrText = .GetLastErrText
MsgBox ErrText
Exit Sub
End If
set OpptyBO = .GetBusObject("Opportunity", errCode)
End With
set OpptyBC = OpptyBO.GetBusComp("Opportunity", errCode)
End Sub

2-52

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

Instantiating the Siebel ActiveX Application Control

The mechanism for instantiating the Application Control depends on the


programming tool or language being used. The following examples show how to
use Microsoft Visual Basic 5.0 to interface with the Siebel ActiveX interfaces.
The Siebel ActiveX Application Control accesses the server object instantiated by
the Siebel eBusiness Application. In Microsoft Visual Basic, the Siebel Application
Control object can be dragged and dropped onto the form. Once you have the server
object, you can obtain the other Siebel objects and execute Siebel business object
interface methods through those objects. Calls made to the Siebel ActiveX
Application Control are in-process.
NOTE: The LoadObjects method is not needed with the Siebel ActiveX interfaces.
The Login method handles both logging in to the application as well as starting the
Object Manager task for starting the application.

The following is sample code for the Siebel ActiveX Application Control:
Sub Login_Click()
SiebelApplicationControl1.Login "host=""siebel//:host/
EnterpriseServer/AppObjMgr/SiebelServer""", "CCONWAY", "CCONWAY"
If SiebelApplicationControl1.GetLastErrCode() Then
MsgBox ("Login error")
End If
SiebelApplicationControl1.GotoView "Account List View", Nothing
End Sub

See Table 2-3 on page 2-43 for values to substitute for the placeholders in the login
string.

Version 6.0

Siebel Object Interfaces Reference

2-53

Programming
Getting Started with the Siebel Object Interfaces

Accessing Siebel ActiveX Application Controls on a Thin Client


through JavaScript

User interface methods are normally not relevant on the thin client because they are
processed on either the Windows Object Manager or the Unix Object Manager,
neither of which has a user interface. However, the ActiveX Thin Client embedded
in Internet Explorer can be manipulated by client-side JavaScript. Therefore, you
can use any ActiveX application controls using client-side JavaScript.
The following code demonstrates the use of client-side JavaScript to access
application controls via a thin client. This example uses the sample database. You
must log on with one of the sample IDs: SADMIN, CCONWAY, and so on. See
Table 2-3 on page 2-43 for values to substitute for the placeholders in the login
string.

<html>
<head><script language="JavaScript">
<!-function wndLoad()
{
}
function navigate()
{
name = SiebelApplicationControl1.LoginName();
position = SiebelApplicationControl1.PositionName();
alert ("Using JavaScript to navigate " + name + ", " +
position + ", to the last record on All Account List View");
Obj = SiebelApplicationControl1.GetBusObject ("Account")
SiebelApplicationControl1.GotoView('All Account List View', Obj);
comp = SiebelApplicationControl1.ActiveBusComp();
comp.LastRecord();
}
-->
</script>
<title>Siebel Thin Client</title>
</head>

2-54

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

<body onLoad="wndLoad()" TOPMARGIN="0" LEFTMARGIN="0">


<form method="POST">
<p><input type="button" value="Navigate to Account View"
onClick="navigate()" name="B3"><font face="Verdana">&nbsp;
</font></p>
<h4><font face="Verdana">
Client-side JavaScript on this button can be used to control the
ActiveX Application Control below:</font>
</h4>
<p><font face="Verdana" size="2">(
To view HTML/JavaScript source code, select View - Source
from your browser menu.)</font>
</p>
</form>
<h4>
<object ID="SiebelApplicationControl1" WIDTH="100%" HEIGHT="100%"
CLASSID="CLSID:38E95018-1EBB-11d3-A22C-00508B347441"
data = "DATA:application/xoleobject;BASE64,GFDpOLse0xGiLABQizR0QQICAABmXAAAMTQAAA==">
</object>
</h4>
</body>
</html>

Instantiating the Siebel ActiveX Data Control

To instantiate and use the Siebel ActiveX Data Control, you must use the
CreateObject and Login methods. You cannot use methods that retrieve active Siebel
objects, because there are no current active Siebel objects. You must instantiate all
of your own Siebel objects. Calls made to the Siebel ActiveX Data Control are also
in-process.
The following is the sample code for the Siebel ActiveX Data Control.
Sub CreateDataControl()
Dim errCode As Integer
Set SiebelApplication =
CreateObject("SiebelDataControl.SiebelDataControl.1")
SiebelApplication.Login "host=""siebel//:host/EnterpriseServer/
AppObjMgr/SiebelServer""", "CCONWAY","CCONWAY"

Version 6.0

Siebel Object Interfaces Reference

2-55

Programming
Getting Started with the Siebel Object Interfaces

errCode = SiebelApplication.GetLastErrCode()
If errCode <> 0 Then
ErrText = SiebelApplication.GetLastErrText
MsgBox ErrText
Exit Sub
End If
set OpptyB0 = SiebelApplication.GetBusObject("Opportunity",errCode)
set OpptyBC = OpptyBO.GetBusComp("Opportunity", errCode)
End Sub

See Table 2-3 on page 2-43 for values to substitute for the placeholders in the login
string.
Here is sample code for instantiating the ActiveX Data Control from a server-side
ASP script. For full details, see the Siebel Client Installation and Administration
Guide.
NOTE: The symbols <% and %> are used within HTML script to set off an ASP script.

<%
Dim SiebelApplication, BO, BC, ConnStr, logstat
Dim strLastName, strFirstName, errCode, errText
Set SiebelApplication =
CreateObject("SiebelDataControl.SiebelDataControl.1")
' Test to see if object is created
If IsObject(SiebelApplication) = False then
Response.Write "Unable to initiate Siebel Session.
Else
ConnStr = "host = " & Chr(34) & "siebel//:host/
EnterpriseServer/AppObjMgr/SiebelServer" & Chr(34) & " Lang = " &
Chr(34) & "ENU" & Chr(34)
logstat = SiebelApplication.Login ConnStr, "SADMIN",
"SADMIN"
response.write(Login Status: & logstat)
Set BO = SiebelApplication.GetBusObject("EMPLOYEE")
Set BC = SBusObj.GetBusComp("EMPLOYEE")
End If
%>

2-56

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

Instantiating the Java Data Bean

To instantiate and use the Siebel Java Data Bean, you must instantiate a new
SiebelDataBean Java object and call its login method. You cannot use methods that
retrieve active Siebel objects, because there are no current active Siebel objects. You
must instantiate all of your own Siebel objects.
The following is the sample code for the Siebel Java Data Bean.
import com.siebel.data.*;
import com.siebel.data.SiebelException;
public class DataBeanDemo
{
private SiebelDataBean m_dataBean = null;
private SiebelBusObject
m_busObject = null;
private SiebelBusComp
m_busComp = null;
public static void main(String[] args)
{
DataBeanDemo demo = new DataBeanDemo();
}
public DataBeanDemo()
{
try
{
// instantiate the Siebel Data Bean
m_dataBean = new SiebelDataBean();
// login to the server
m_dataBean.login("SOMSERVER, somsiebel, AppObjMgr,
SOMSERVER", "CCONWAY", "CCONWAY");
// get the business object
m_busObject = m_dataBean.getBusObject("Opportunity");
// get the business component
m_busComp = m_busObject.getBusComp("Opportunity");
// logoff
m_dataBean.logoff();
}
catch (SiebelException e)
{
System.out.println(e.getErrorMessage());
}
}
}

Version 6.0

Siebel Object Interfaces Reference

2-57

Programming
Getting Started with the Siebel Object Interfaces

Initializing ORB and Binding Siebel App Factory (Orbix)

To initialize and start running the client application, a bind operation has to be
performed to bind the client application to the Application factory object in the
Siebel CORBA Application Object Manager. The bind operation creates a separate
Siebel CORBA Application Object Manager thread. After binding to the factory
object, the Siebel Application Object can be created and initialized. The name of the
host machine is optionally included as an argument to the bind call. If the host
machine is a local machine, the host machine name need not be passed as an
argument to the bind operation. The SiebelObjectFactory is the name of the factory
object. The name of the server specified in the bind call (for example,
SiebelCorbaServer in the sample code below) should be the same as the server
name provided when you configured the Siebel CORBA Application Object
Manager.
The bind operation returns a reference to the Siebel Application Factory Object.
NOTE: See the Siebel System Requirements and Supported Platforms document for

the correct version of Orbix to use.


SiebelAppFactory* appFact;
char* strServerName = new char[SERVER_NAME_LEN];
char* strHostName = "SCOMSERVER";
// append the host name to the server name
strcpy(strServerName,"SiebelObjectFactory:SiebelCorbaServer");
try {
// bind to the Factory object in the server.
appFact = SiebelAppFactory::_bind(strServerName,
strHostName);
} catch(const CORBA::SystemException& excep) {
cout << "Error binding to SiebelObjectFactory" <<
endl;
return;
}

2-58

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

CreateSiebelAppObject returns the reference to the Siebel Application Object.


SiebelApplication_var appObj;
try {
appObj = appFact->CreateSiebelAppObject();
cout << "Created Siebel object" << endl;
}
catch (const SiebelException& seblExcep) {
cerr << "Error id
: " << seblExcep.id << endl;
cerr << "Error text : " << endl;
cerr << seblExcep.desc << endl;
return;
}

After the bind and creation of the Siebel Application Object, the application must
log on to the Siebel Application Object Manager to access the Siebel business
objects. At the end of the session, the client can log off the session using the Logoff
method.
The sample code below illustrates the invocation of the Login and GetBusObject
methods to communicate with the Siebel Application Object Manager.
try {
// call the login method to access the Siebel application
appObj->Login("CCONWAY", "CCONWAY");
// Get the reference to the Accounts business object
pBusObj = appObj->GetBusObject("Account");
} catch (SiebelException& excep) {
cerr << "Error code : " << excep.id << endl;
cerr << "Error text : " << excep.desc << endl;
return;
}

Version 6.0

Siebel Object Interfaces Reference

2-59

Programming
Getting Started with the Siebel Object Interfaces

Initializing ORB and Binding Siebel App Factory (Visibroker)

When using Inprise's Visibroker ORB, the client application must bind to the Siebel
Application Factory object as the Orbix clients do. However, the name of the host
machine need not be passed on as an additional argument to the bind call.
NOTE: See the Siebel System Requirements and Supported Platforms document for

the correct version of Visibroker to use.


The sample code below shows how to get reference to the application factory and
create an application object.
SiebelAppFactory_var appFact;
SiebelApplication_var appObj;
char objectRootName[OBJECTNAMELEN];
try {
// Initialize the ORB.
orb = CORBA::ORB_init(argc, argv);
sprintf(objectRootName, "SiebelObjectFactory";
// bind to the Factory object in the server.
appFact = SiebelAppFactory::_bind(objectRootName);
} catch(const CORBA::Exception& excep) {
// Standard exception.
cerr << "Error id
: " << seblExcep.id << endl;
cerr << "Error text : " << endl;
cerr << seblExcep.desc << endl;
return;
}
try {
appObj = appFact->CreateSiebelAppObject();
cout << "Created Siebel object" << endl;
} catch (const SiebelException& seblExcep) {
cerr << "Error id
: " << seblExcep.id << endl;
cerr << "Error text : " << endl;
cerr << seblExcep.desc << endl;
return;
}

2-60

Siebel Object Interfaces Reference

Version 6.0

Programming
Getting Started with the Siebel Object Interfaces

After the bind and creation of the Siebel Application Object, the application must
log on to the Siebel Application Object Manager to access the Siebel business
objects. At the end of the session, the client can log off the session using the Logoff
method.
The sample code below illustrates the invocation of the Login and GetBusObject
methods to communicate with the Siebel Application Object Manager.
try {
// call the login method to access the Siebel application
appObj->Login("CCONWAY", "CCONWAY");
// Get the reference to the Accounts business object
pBusObj = appObj->GetBusObject("Account");
} catch (SiebelException& excep) {
cerr << "Error code : " << excep.id << endl;
cerr << "Error text : " << excep.desc << endl;
return;
}

Any variables that are set in the Application_Start event will not be visible to
methods invoked by the COM Data Server. This is because running a COM Data
Server means by definition that no Siebel client exists and therefore the
Application_Start event is never invoked.

Version 6.0

Siebel Object Interfaces Reference

2-61

Programming
Siebel Object Interface Methods

Siebel Object Interface Methods

Several groups of methods are available to Siebel object interface programmers.


They are organized according to functional capabilities in the following sections:

Locating objects. These are methods that enable the user to locate instances of
objects so that they can be manipulated by other methods.

Accessing business components. These are methods that provide the ability to

access and modify data within Siebel applications.

Navigation. These are methods that provide a way to control the flow of the
application as it is presented to the user by explicitly setting the focus of the
application to the desired view, applet, or control. These methods are useful only
when accessing the Siebel object interfaces from Siebel VB, when accessing
Siebel as a COM Automation Server, or through the Siebel ActiveX Application
Control, in which cases Siebel presents its user interface. When Siebel is
accessed through the COM Data Server, ActiveX Data Control, Java Data Bean,
or CORBA Application Object Manager, no Siebel user interface is present.

Manipulating controls. These are the methods that set or get the value of a control.

These methods are useful only when accessing the Siebel object interfaces from
Siebel VB, when accessing Siebel as a COM Automation Server, or through the
Siebel ActiveX Application Control, in which cases Siebel presents its user
interface.

Global state properties and functions. These are methods that enable you to get

information on the current state of the system.

User interaction. These are methods that provide user interface elements similar

to those in standard Windows programs.

Creating a Siebel application in CORBA. There is one method that is used to create

a Siebel application object in CORBA.

2-62

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Methods

Locating Objects

This set of methods allows the user to locate instances of objects within Siebel
applications so they can be used by other methods. Active objects are instances of
objects that currently have focus. The active control is the control that currently has
the user interface focus. The active applet is the applet that contains the active
control. The active business component is the business component associated with
the active applet. Once located, an object can be used or manipulated by Siebel
object interfaces.
The following methods are used for locating objects.
ActiveControl on page 3-25

FindApplet on page 3-56

BusComp on page 3-26

GetBusObject on page 3-57

BusObject on page 3-28

BusObject on page 3-103

FindActiveXControl on page 3-31

BusComp on page 3-225

FindControl on page 3-32

Applet on page 3-224

ActiveApplet on page 3-48

BusObject on page 3-226

ActiveBusComp on page 3-49

GetValue on page 3-229

ActiveBusObject on page 3-50

theApplication on page 3-249

ActiveViewName on page 3-53

Accessing Business Components

The Siebel business component object (BusComp) presents a two-dimensional grid


of data values much like a table in a relational database. The named fields are
analogous to columns in the database table, and the records are analogous to rows.
Developers use business components to read data, manipulate it, and write it back
into the Siebel database. Business components are extremely powerful because they
manage the complexities of multiple-table access to the database and access to
different types of databases (Oracle, MS SQL Server, and so on), freeing you to
concentrate on the use of the data within a program.
Many methods are available to use on business components for getting and setting
the values of their fields. Record operations can be performed programmatically by
using business component access methods.

Version 6.0

Siebel Object Interfaces Reference

2-63

Programming
Siebel Object Interface Methods

These operations invoke Siebel VB or Siebel eScript extension routines. For


example, if you have created a Siebel VB or Siebel eScript script that is tied to the
NewRecord event on a business component, the script is processed whenever
NewRecord in that business component is processed, even if the NewRecord
method was called by another Siebel VB or Siebel eScript script or was called from
the Siebel object interfaces. Note that events are available only with Siebel VB or
Siebel eScript.

Adding and Inserting Records


In the context of a many-to-many relationship, you can use Siebel VB or Siebel
eScript to mimic either the Add New Record command, which associates a new
child record, or the Insert Record command, which creates a completely new
record in the child business component. To accomplish the former (Add), use
GetAssocBusComp and the Associate method. To accomplish the latter (Insert), use
the NewRecord method in a child business component, or use GetMVGBusComp
and the NewRecord method.

Committing Records to the Database


A commit is performed under the following circumstances:

 Explicitly by issuing BusComp.WriteRecord


 Navigating away from the current record by any of the following methods:
BusComp.NextRecord

BusComp.LastRecord

BusComp.PreviousRecord

BusComp.NextSelected

BusComp.FirstRecord

BusComp.DeleteRecord
(DeleteRecord commits
automatically, since it moves the
cursor to another record.)

 Closing a BusComp (Set BusComp = Nothing)

2-64

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Methods

Scenarios for Business Components


Below are two scenarios involving the use of Siebel scripts to work with business
components.
The first example shows how to invoke methods on an existing business component
when an event is triggered. In this example, the VB script is in the SetFieldValue
event of a business component.
Sub BusComp_SetFieldValue (FieldName As String)
Dim desc As String
Dim newDesc As String
If FieldName = "Type" Then
newDesc = "Any valid string which contains the new
description."
desc = GetFieldValue("Description")
MsgBox "The previous description is " + desc
SetFieldValue "Description", newDesc
MsgBox "The new description is " + newDesc
End If
End Sub

The next example shows how to instantiate your own BusObject and BusComp.
This example uses the PreSetFieldValue event of the Opportunity BusComp. If the
Sales Stage is updated to 07 - Verbal Agreement, a decision maker must be
associated with the opportunity. Otherwise, it will be reset to the previous value.
The Contacts for the selected opportunity will be searched to see if any vice
president or president is associated with the opportunity.

The logical flow of instantiating your own BusComp object is as follows


1 GetBusComp
2 SetViewMode (optional, the BusComp may already be in the correct mode)
3 ActivateField
4 ClearToQuery
5 SetSearchSpec or SetSearchExpr
6 ExecuteQuery

Version 6.0

Siebel Object Interfaces Reference

2-65

Programming
Siebel Object Interface Methods

Function BusComp_PreSetFieldValue (FieldName As String,


FieldValue As String) As Integer
Dim RetValue As Integer
RetValue = ContinueOperation
Select Case FieldName
Case "Sales Stage"
If FieldValue = "07 - Verbal Agreement" Then
' Do not allow the sales cycle to be changed to this value
' if the decision-maker is not a contact for the Oppty.
' Decision-maker defined as anyone with VP rank and above.
Dim CurrOppty As BusComp
Dim ContactBC As BusComp
Dim oBusObj As BusObject
Dim sRowId As String
Dim iViewMode As Integer
sRowId = GetFieldValue("Id")
iViewMode = GetViewMode
Set oBusObj = TheApplication.GetBusObject("Opportunity")
Set CurrOppty = oBusObj.GetBusComp("Opportunity")
' Here we are querying the CurrOppty BusComp so that the same
' record as the one displayed in the User Interface is retrieved.
With CurrOppty
.SetViewMode iViewMode
.ClearToQuery
.SetSearchSpec "Id", sRowId
.ExecuteQuery ForwardOnly
End With
' Because parent-child relationship is established when BusComps
' are instantiated from the same BusObject. The ContactBC will
have
' all contact records for the current Oppty record.
Set ContactBC = oBusObj.GetBusComp("Contact")
With ContactBC
.ActivateField "Job Title"
.ClearToQuery
.SetSearchSpec "Job Title", "*VP* OR *Vice Pres*"
.ExecuteQuery ForwardBackward
If (.FirstRecord = 0) Then
MsgBox("A decision maker for establishing a verbal
agreement is not associated with this
opportunity.
Identify the decision-maker before changing the

2-66

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Methods

Sales
Cycle to Verbal Agreement.")
RetValue = CancelOperation
Else
MsgBox("A decision maker was found")
End If
End With
End If
End Select
BusComp_PreSetFieldValue = RetValue
End Function

Version 6.0

Siebel Object Interfaces Reference

2-67

Programming
Siebel Object Interface Methods

Methods for Accessing Business Components


The following methods are used for accessing business components.
AllowNotification on page 3-100

LastRecord on page 3-132

Associate on page 3-101

NewRecord on page 3-134

ClearToQuery on page 3-104

NextRecord on page 3-136

DeactivateFields on page 3-105

NextSelected on page 3-137

DeleteRecord on page 3-106

ParentBusComp on page 3-138

ExecuteQuery on page 3-107

Pick on page 3-139

ExecuteQuery2 on page 3-110

PreviousRecord on page 3-141

FirstRecord on page 3-111

RefineQuery on page 3-142

FirstSelected on page 3-112

SetFieldValue on page 3-143

GetAssocBusComp on page 3-113

SetFormattedFieldValue on page 3-145

GetFieldValue on page 3-115

SetNamedSearch on page 3-147

GetFormattedFieldValue on page 3-117

SetSearchExpr on page 3-148

GetMVGBusComp on page 3-121

SetSearchSpec on page 3-150

GetNamedSearch on page 3-123

SetSortSpec on page 3-154

GetPicklistBusComp on page 3-124

SetViewMode on page 3-157

GetSearchExpr on page 3-126

SuppressNotification on page 3-159

GetSearchSpec on page 3-127

UndoRecord on page 3-160

GetViewMode on page 3-129

WriteRecord on page 3-161

InvokeMethod on page 3-130

2-68

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Methods

Navigation

The navigation methods set the focus for user interaction to the named view.
Table 2-4 identifies the navigation methods.
NOTE: Properties for Siebel objects such as business component applets and
business components are stored in the repository and cannot be changed at run
time using Siebel VB methods.

Table 2-4.

Navigation Methods

Method
Drilldown on page 3-29
GotoControl on page 3-33
GotoApplet on page 3-63
GotoView on page 3-64

User Interaction

The following methods allow the Siebel extension routines to interact directly with
the user through traditional user interface techniques. These methods are similar to
the standard procedures available to Windows programs. User interaction methods
are listed in Table 2-5.
Table 2-5.

User Interaction Methods

Method
InputBox on page 3-66
MsgBox on page 3-75
ShowStatus on page 3-84

Version 6.0

Siebel Object Interfaces Reference

2-69

Programming
Siebel Object Interface Methods

Manipulating Controls

The following methods are provided to interact with controls. These methods take
the control as the first argument and return information about the control or change
the state of the control. Control manipulation methods are listed in Table 2-6.
Table 2-6.

Control Manipulation Methods

Method
PostChanges on page 3-37
GetProperty on page 3-227
SetProperty on page 3-231

Global State Properties and Functions

The application object provides a set of properties and functions that return
information about the current state of the system. This information is useful when
you are processing rows of data or generating query criteria. Global state methods
are listed in Table 2-7.
Table 2-7.

Global State Methods

Method
CurrencyCode on page 3-54
EnableExceptions on page 3-55
GetLastErrCode on page 3-58
GetLastErrText on page 3-59
LoginId on page 3-72
LoginName on page 3-73
Logoff on page 3-74
NewPropertySet on page 3-78
PositionName on page 3-80

2-70

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Methods

Creating a Siebel Application Object in CORBA

The method in Table 2-8 provides a way to create a Siebel application object in
CORBA.
Table 2-8.

Creating a Siebel Application Object in CORBA

Method
CreateSiebelAppObject on page 3-245

Version 6.0

Siebel Object Interfaces Reference

2-71

Programming
Variable Scoping for Siebel Script Variables

Variable Scoping for Siebel Script Variables

Three levels of scope exist for Siebel variables.

Local Variables
Local variables defined within a Siebel script are the lowest level of variable
scoping. These variables are declared using the Dim statement in Siebel VB or the
var statement in Siebel eScript, and their values are accessible only within the script
in which they were defined.
VB example:
Sub Applet_GotFocus
Dim localStr as String
End Sub

eScript example:
function Applet_GotFocus ()
{
var localStr;
{

Module Variables
Module variables defined in the (general) (declarations) section of a Siebel object
(such as an applet or business component) are the next level of variable scoping.
These variables are available as long as the object is instantiated and the values are
accessible to all scripts in the same object or module. Use Dim statements (for VB)
or var statements (for eScript) in the (general) (declarations) section to declare
module variables.
VB example:
(general) (declarations)
Dim ContactId as String

2-72

Siebel Object Interfaces Reference

Version 6.0

Programming
Variable Scoping for Siebel Script Variables

Code in the VB Editor in the (general) (declarations) section is illustrated in


Figure 2-11.

Figure 2-11. Declarations in the (general) (declarations) section

Global Variables
At the highest level are the global variables. These variables must be declared in
every module that needs to access their values. They are declared with the Global
statement. Avoid using global variables to store Siebel objects such as BusComp and
BusObject. If this is necessary, always set these variables to Nothing whenever the
objects are no longer required, or at least in the Application_Close event. Failure to
do so may cause memory problems because the objects being referenced cannot be
freed from memory while they are still being referenced. If you must create a global
variable for a business component, make sure there is a global variable for the
business object; otherwise the business component will be out of scope.
Example:
(general)(declarations)
Option Explicit
'for every module that uses this variable
Global gVar as Integer

Version 6.0

Siebel Object Interfaces Reference

2-73

Programming
Variable Scoping for Siebel Script Variables

Inter-Application Variable Methods

Siebel provides two sets of methods to send values for variables back and forth
between the Siebel application and external applications. Inter-application
communication methods are listed in Table 2-9.
Table 2-9.

Inter-Application Communication Methods

Method
GetUserProperty on page 3-128
SetUserProperty on page 3-156
GetLastErrCode on page 3-58
SetSharedGlobal on page 3-82

Tracing

Application event methods for controlling debug tracing include those in Table 2-10.
Table 2-10.

Debug Tracing Methods

Method
Trace on page 3-85
TraceOff on page 3-87
TraceOn on page 3-88

2-74

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Events and Siebel Extension Events

Siebel Object Interface Events and


Siebel Extension Events

Available only for Siebel VB and Siebel eScript, selected events within the Siebel
applications allow the association of extension routines that extend the base
behavior of the application. When the Siebel application fires or activates the event,
the user-specified procedures will be invoked along with the standard Siebel
procedures. The event names listed under Siebel Business Component Events on
page 2-81 or User Interface Control Events on page 2-82 refer to the tag or entry
point used to tie the extension routine to a particular action or event.
For each event in these sections, the following information is provided:

 The syntax for using the event


 A brief description of the event
 A checklist that indicates which interface environments support the event

Event Method Syntax

The methods syntax uses the following form:


ObjectReference_EventName (parameters) As RetValue

 ObjectReference is the variable name of the object on which the event is invoked.


EventName is the event that is being invoked.

The events exposed can be classified into preoperation events or postoperation


events. The preoperation events occur before the standard Siebel operation.
An example of a preoperation event is PreDeleteRecord. This event occurs before
a DeleteRecord event occurs.
The corresponding postoperation event is DeleteRecord. This event is fired after
the PreDeleteRecord operation has been executed.

Version 6.0

Siebel Object Interfaces Reference

2-75

Programming
Siebel Object Interface Events and Siebel Extension Events

You can take advantage of preoperation events to alter standard Siebel behavior.
For example, the PreDeleteRecord event can be used to perform additional,
customer-specific validation on the record about to be deleted, and if the validations
fail, the DeleteRecord operation can be canceled.
Postoperation events are useful when the event relies on data that may have
been updated in the course of executing the standard Siebel event.

How Your Script Affects Program Flow

For every Siebel operation event handler, there is also a preoperation event handler.
Generally, scripts are placed in the preoperation event. You can alter the effect of an
event by attaching a script to the preoperation event handler. The events with the
most far-reaching effects are the PreInvokeMethod events. In a PreInvokeMethod
event, you can call a method that substitutes for the internal Siebel code.

2-76

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Events and Siebel Extension Events

As Figure 2-12 illustrates, you can change the outcome of an event by specifying the
return value on the preoperation events. The standard return value for preoperation
events is ContinueOperation, which tells the calling Siebel object to continue
processing the remaining operations associated with the event (Step 2).

S te p 1

PreInvokeMethod
Event fires to run VB or
eScript code

CancelOperation

ContinueOperation

S te p 2

Any internal Siebel


code for the event runs

Any code in the


PreInvokeMethod following
the CancelOperation
is executed

S te p 3

InvokeMethod

No internal Siebel code


for the event runs

Stop

Stop

Figure 2-12. The Effects of CancelOperation and ContinueOperation

If you wish to create an alternative to an existing routine, simply change the return
value in your custom event handler to CancelOperation. This tells Siebel to cancel
the remaining operations associated with the event. If, for example, the validation
in the PreDeleteRecord event fails, set the return value for the event to
CancelOperation. If you wish to do some preprocessing before the default event
method executes, use the return value ContinueOperation.

Version 6.0

Siebel Object Interfaces Reference

2-77

Programming
Siebel Object Interface Events and Siebel Extension Events

The post-event handler is rarely scripted, but may be used for such post-operation
events as posting a notice to a log when the event completes successfully.
The following Siebel VB example sets up a validation routine in which a specific
field is queried to determine whether the event should fire.
Function BusComp_PreSetFieldValue (FieldName As String,
FieldValue As String) As Integer
' Routine to check if a quote discount > 20%
'
if it is, notify user and cancel the operation
Dim value as Integer
Dim msgtext as String
If FieldName = "Discount" then
value = Val(FieldValue)
If value > 20 then
msgtext = "Discounts greater than 20% must be approved"
msgbox (msgtext)
BusComp_PreSetFieldValue = CancelOperation
Else
BusComp_PreSetFieldValue = ContinueOperation
End if
End If
End Function

Notice the logical structure of this routine:


If (condition is true)
[perform custom routine]
returnValue = CancelOperation
Else
returnValue = ContinueOperation
End If

Within this structure, the custom routine is executed only if the condition is true. If
the condition is true, the custom routine substitutes for the built-in routine. If it is
not true, the built-in routine is executed because the event handler returns
ContinueOperation.

2-78

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Events and Siebel Extension Events

The following alternative structure is also acceptable.


returnValue = ContinueOperation
If (condition is true)
[perform custom routine]
returnValue = CancelOperation
End If

Note that in PreInvokeMethod events, the condition should always be a test for the
method name; for example,
if (methodName = "PushOpportunity")
Alternatively, especially if more than one method may be invoked, you may find it
more efficient to use a Select structure (in VB) or a switch structure (in eScript). In
Siebel VB:
Dim iReturn As Integer
iReturn = ContinueOperation
Select Case methodName
Case "PushOpportunity"
[custom routine]
iReturn = CancelOperation
Case "Stage3"
[custom routine]
iReturn = CancelOperation
End Select
object_PreInvokeMethod = iReturn

Version 6.0

Siebel Object Interfaces Reference

2-79

Programming
Siebel Object Interface Events and Siebel Extension Events

In Siebel eScript:
var iReturn;
switch methodName
{
case "PushOpportunity":
[custom routine]
iReturn = CancelOperation;
break;
case "Stage3":
[custom routine]
iReturn = CancelOperation;
break;
default:
iReturn = ContinueOperation;
}
object_PreInvokeMethod() = iReturn;

To make your code easier to read and maintain, you can create the custom routines
as sub-programs or functions in the (general) (declarations) section.

When Events Occur

There is no simple way to determine when various events occur, as many different
events can occur when a view becomes current or when an object is invoked. The
only reliable way to find out the exact order of events is to place a line of code of
the following form in each event handler (including the Pre event handlers) for the
view or object, including insert, delete, write, business component, and any others
that may apply:
MsgBox "Event_Name fired."
Then do some simple inserts, updates, and deletes, and make a note of each
message as it appears. You will then have a list of the order in which events fire on
that view or for that object.
With applet events, the Applet_GotFocus event fires as soon as the applet receives
focus, whether or not it is active.

2-80

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Events and Siebel Extension Events

Siebel Business Component Events

Events can be invoked from data operations on business components. These are
defined on a per-business component basis. Events can be invoked before or after
the specified standard behavior.
If you want to trap for modifications to a multi-value field, be aware that
PreSetFieldValue and SetFieldValue events for the parent business component will
be called only if the multi-value field is modified without popping up the multivalue group applet. (In some cases, the user will be prevented from making changes
to the field in this manner, in which case the PreSetFieldValue event on the parent
business component will be called, and then the user will be forced to edit the field
using the MVG applet.) If the user makes changes to the multi-value field through
the MVG applet, then only the events on the MVG business component will be
called; no events on the parent business component will be called.
BusComp events are listed in Table 2-11.
Table 2-11.

BusComp Events

(Sheet 1 of 2)

Method
BusComp_Associate on page 3-164
BusComp_ChangeRecord on page 3-165
BusComp_PreCopyRecord on page 3-172
BusComp_CopyRecord on page 3-167
BusComp_InvokeMethod on page 3-169
BusComp_NewRecord on page 3-170
BusComp_PreAssociate on page 3-171
BusComp_PreDeleteRecord on page 3-173
BusComp_PreGetFieldValue on page 3-175
BusComp_PreInvokeMethod on page 3-176
BusComp_PreNewRecord on page 3-177
BusComp_PreQuery on page 3-178

Version 6.0

Siebel Object Interfaces Reference

2-81

Programming
Siebel Object Interface Events and Siebel Extension Events

Table 2-11.

BusComp Events

(Sheet 2 of 2)

Method
BusComp_PreSetFieldValue on page 3-179
BusComp_PreWriteRecord on page 3-181
BusComp_Query on page 3-182
BusComp_SetFieldValue on page 3-184
BusComp_WriteRecord on page 3-185

User Interface Control Events

Events are invoked in response to user interactions. These can be managed on a percontrol basis. User interface events are listed in Table 2-12.
Table 2-12.

User Interface Events

(Sheet 1 of 2)

Method
Applet_ChangeFieldValue on page 3-38
Applet_ChangeFieldValue on page 3-38
Applet_ChangeRecord on page 3-39
Applet_InvokeMethod on page 3-42
Applet_Load on page 3-43
Applet_LostFocus on page 3-44
Applet_PreInvokeMethod on page 3-46
Application_Close on page 3-91
Application_InvokeMethod on page 3-92
Application_PreInvokeMethod on page 3-94
Application_Start on page 3-96
ControlName_Click on page 3-247

2-82

Siebel Object Interfaces Reference

Version 6.0

Programming
Siebel Object Interface Events and Siebel Extension Events

Table 2-12.

User Interface Events

(Sheet 2 of 2)

Method
WebApplet_InvokeMethod on page 3-237
WebApplet_PreInvokeMethod on page 3-238
WebApplet_ShowControl on page 3-239
WebApplet_ShowListColumn on page 3-242

Version 6.0

Siebel Object Interfaces Reference

2-83

Programming
Siebel Object Interface Events and Siebel Extension Events

2-84

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference

Object Interface Methods Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8


Object Interface Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Siebel Constants

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23

Applet Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25


ActiveControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
BusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-26
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-28
Drilldown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-29
FindActiveXControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
FindControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
GotoControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-33
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-34
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-36
PostChanges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37
Applet Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
Applet_ChangeFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
Applet_ChangeRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39
Applet_GotFocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40
Applet_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-42
Applet_Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43
Applet_LostFocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-44
Applet_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46

Version 6.0

Siebel Object Interfaces Reference

3-1

Interfaces Reference

Application Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48


ActiveApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48
ActiveBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
ActiveBusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50
ActiveControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-51
ActiveViewName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53
CurrencyCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54
EnableExceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55
FindApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56
GetBusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57
GetLastErrCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58
GetLastErrText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-59
GetProfileAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-60
GetService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-61
GetSharedGlobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-62
GotoApplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-63
GotoView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-64
InputBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-66
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-68
LoadObjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-69
Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-70
LoginId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-72
LoginName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73
Logoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-74
MsgBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-75
NewPropertySet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-78
PositionId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
PositionName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-80
SetSharedGlobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-82
SetProfileAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83
ShowStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-84

3-2

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference

Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-85
TraceOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-87
TraceOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-88
Application Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-91
Application_Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-91
Application_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-92
Application_PreClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-93
Application_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-94
Application_Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-96
Business Component Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-98
ActivateField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-98
AllowNotification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-100
Associate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-101
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-103
ClearToQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-104
DeactivateFields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-105
DeleteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-106
ExecuteQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-107
ExecuteQuery2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-110
FirstRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-111
FirstSelected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-112
GetAssocBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-113
GetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-115
GetFormattedFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-117
GetLastErrCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-119
GetLastErrText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-120
GetMVGBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-121
GetNamedSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-123
GetPicklistBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-124
GetSearchExpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-126
GetSearchSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-127

Version 6.0

Siebel Object Interfaces Reference

3-3

Interfaces Reference

GetUserProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-128
GetViewMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-129
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-130
LastRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-132
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-133
NewRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-134
NextRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-136
NextSelected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-137
ParentBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-138
Pick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-139
PreviousRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-141
RefineQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-142
SetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-143
SetFormattedFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-145
SetNamedSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-147
SetSearchExpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-148
SetSearchSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-150
SetSortSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-154
SetUserProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-156
SetViewMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-157
SuppressNotification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-159
UndoRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-160
WriteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-161
Business Component Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-164
BusComp_Associate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-164
BusComp_ChangeRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-165
BusComp_CopyRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-167
BusComp_DeleteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-168
BusComp_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-169
BusComp_NewRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-170
BusComp_PreAssociate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-171

3-4

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference

BusComp_PreCopyRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-172
BusComp_PreDeleteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-173
BusComp_PreGetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-175
BusComp_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-176
BusComp_PreNewRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-177
BusComp_PreQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-178
BusComp_PreSetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-179
BusComp_PreWriteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-181
BusComp_Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-182
BusComp_SetFieldValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-184
BusComp_WriteRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-185
Business Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-186
GetBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-186
GetLastErrCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-187
GetLastErrText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-188
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-189
Business Service Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-190
GetFirstProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-190
GetNextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-191
GetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-192
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-193
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-195
PropertyExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-196
RemoveProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-197
SetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-198
Business Service Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-199
Service_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-199
Service_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-200

Version 6.0

Siebel Object Interfaces Reference

3-5

Interfaces Reference

Property Set Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-204


AddChild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-204
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-206
GetChild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-208
GetChildCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-210
GetFirstProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-211
GetNextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-212
GetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-213
GetType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-214
GetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-215
InsertChildAt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-216
PropertyExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-217
RemoveChild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-218
RemoveProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-219
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-220
SetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-221
SetType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-222
SetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-223
Control Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-224
Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-224
BusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-225
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-226
GetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-227
GetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-229
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-230
SetProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-231
SetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-233
Web Applet Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-234
BusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-234
BusObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-234
InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-235
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-236

3-6

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference

Web Applet Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-237


WebApplet_InvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-237
WebApplet_PreInvokeMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-238
WebApplet_ShowControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-239
WebApplet_ShowListColumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-242
SiebelAppFactory Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-245
CreateSiebelAppObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-245
Miscellaneous Methods and Events . . . . . . . . . . . . . . . . . . . . . . . . . 3-247
ControlName_Click . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-247
GetErrorCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-248
GetErrorMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-248
theApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-249

Version 6.0

Siebel Object Interfaces Reference

3-7

Interfaces Reference
Object Interface Methods Tables

Object Interface Methods Tables

Table 3-1 lists the Siebel interface methods, grouped by object interface type.
Table 3-1.

Interfaces and Methods

Interface

Method

Applet

ActiveControl

(Sheet 1 of 6)

Siebel
VB

Siebel
eScript

Siebel
COM
Automation
Server





























































BusComp
BusObject
Drilldown
FindActiveXControl
FindControl
GotoControl
InvokeMethod
Name
PostChanges

Application/
Data Control

ActiveApplet
ActiveBusComp
ActiveBusObject
ActiveControl
ActiveViewName
CurrencyCode

Siebel
COM
Data
Server

GetBusObject

3-8

Siebel Object Interfaces Reference

Siebel
ActiveX
Data
Control

Java
Data
Bean

Siebel
CORBA
Object
Manager






EnableExceptions
FindApplet

Siebel
ActiveX
App.
Control



















1


Version 6.0

Interfaces Reference
Object Interface Methods Tables

Table 3-1.

Interfaces and Methods

Interface

Method

Application/
Data Control
()

GetLastErrCode
GetLastErrText
GetProfileAttr
GetSharedGlobal
GetService
GotoApplet
GotoView
InputBox
InvokeMethod

(Sheet 2 of 6)

Siebel
VB










Siebel
eScript










Siebel
COM
Automation
Server



















LoadObjects











































Login
LoginId
LoginName

Siebel
COM
Data
Server

Logoff
MsgBox
NewPropertySet
PositionId
PositionName
SetProfileAttr
SetSharedGlobal
ShowStatus
Trace
TraceOff
TraceOn

Version 6.0










Siebel
ActiveX
App.
Control

Siebel
ActiveX
Data
Control

Java
Data
Bean

Siebel
CORBA
Object
Manager




































1


















1
1



Siebel Object Interfaces Reference




3-9

Interfaces Reference
Object Interface Methods Tables

Table 3-1.

Interfaces and Methods

Interface

Method

Business
Component

ActivateField
AllowNotification
Associate
BusObject
ClearToQuery
DeactivateFields
DeleteRecord
ExecuteQuery
ExecuteQuery2
FirstRecord
FirstSelected
GetAssocBusComp
GetFieldValue
GetFormattedFieldValue

(Sheet 3 of 6)
Siebel
COM
Automation
Server

Siebel
COM
Data
Server

Siebel
ActiveX
App.
Control

Siebel
ActiveX
Data
Control

Java
Data
Bean



































1














































1



Siebel
VB

Siebel
eScript





















































































GetLastErrCode
GetLastErrText
GetMVGBusComp
GetNamedSearch
GetPicklistBusComp
GetSearchExpr
GetSearchSpec
GetUserProperty

3-10

Siebel Object Interfaces Reference

Siebel
CORBA
Object
Manager

Version 6.0

Interfaces Reference
Object Interface Methods Tables

Table 3-1.

Interfaces and Methods

Interface

Method

Business
Component
()

GetViewMode
InvokeMethod
LastRecord
Name
NewRecord
NextRecord
NextSelected
ParentBusComp
Pick
PreviousRecord
RefineQuery
SetFieldValue
SetFormattedFieldValue
SetNamedSearch
SetSearchExpr
SetSearchSpec
SetSortSpec
SetUserProperty
SetViewMode
SuppressNotification
UndoRecord
WriteRecord

Version 6.0

(Sheet 4 of 6)

Siebel
VB

Siebel
eScript

Siebel
COM
Automation
Server






































































Siebel
COM
Data
Server

Siebel
ActiveX
App.
Control

Siebel
ActiveX
Data
Control






























Java
Data
Bean

Siebel
CORBA
Object
Manager














1


1



















































Siebel Object Interfaces Reference








1



1



3-11

Interfaces Reference
Object Interface Methods Tables

Table 3-1.

Interfaces and Methods

Interface

Method

Business
Object

GetBusComp

(Sheet 5 of 6)

Siebel
VB

Siebel
eScript

Siebel
COM
Automation
Server

















































































Siebel
COM
Data
Server

Siebel
ActiveX
App.
Control

Siebel
ActiveX
Data
Control















































GetLastErrCode
GetLastErrText
Name

Business
Service

GetFirstProperty
GetNextProperty
GetProperty
InvokeMethod
Name
PropertyExists
RemoveProperty
SetProperty

PropertySet

AddChild
Copy
GetChild
GetChildCount
GetFirstProperty
GetNextProperty
GetProperty
GetType
GetValue
InsertChildAt

3-12

Siebel Object Interfaces Reference

Java
Data
Bean

Siebel
CORBA
Object
Manager

1











1



















Version 6.0

Interfaces Reference
Object Interface Methods Tables

Table 3-1.

Interfaces and Methods

Interface

Method

PropertySet
()

PropertyExists
RemoveChild
RemoveProperty
Reset
SetProperty
SetType
SetValue

Control

Applet
BusComp
BusObject
GetProperty
GetValue
Name
SetProperty
SetValue

WebApplet

BusComp
BusObject
InvokeMethod
Name

SiebelAppFactory

CreateSiebelAppObject

Miscellaneous

theApplication
ControlName_Click
getErrorCode
getErrorMessage

Version 6.0

(Sheet 6 of 6)

Siebel
VB

Siebel
eScript















































Siebel
COM
Automation
Server

















Siebel
COM
Data
Server

Siebel
ActiveX
App.
Control

Siebel
ActiveX
Data
Control

































Java
Data
Bean

Siebel
CORBA
Object
Manager












Siebel Object Interfaces Reference

3-13

Interfaces Reference
Object Interface Methods Tables

1. Implemented as an attribute. (In CORBA, a method that takes no argument is called an attribute.)

Table 3-2 shows the interfaces and methods supported in the Siebel Thin Clients.
This includes the Windows Thin Client, the Java Thin Client, and the HTML Thin
Client. User interface methods are not relevant on the thin client because they are
processed on either the Windows Object Manager or the UNIX Object Manager,
which have no user interface. However, see Accessing Siebel ActiveX Application
Controls on a Thin Client through JavaScript on page 2-54 for a work-around.
Table 3-2.

Thin Client Methods

(Sheet 1 of 5)

Interface

Method

Application /Data Control

CurrencyCode
EnableExceptions
GetBusObject
GetLastErrCode
GetLastErrText
GetSharedGlobal
GetService
InvokeMethod
LoadObjects
Login
LoginId
LoginName
Logoff
NewPropertySet
PositionId
PositionName

3-14

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Object Interface Methods Tables

Table 3-2.

Thin Client Methods

(Sheet 2 of 5)

Interface

Method

Application /Data Control


)

SetSharedGlobal
Trace
TraceOff
TraceOn

Business Component

ActivateField
AllowNotification
Associate
BusObject
ClearToQuery
DeactivateField
DeleteRecord
ExecuteQuery
ExecuteQuery2
FirstRecord
FirstSelected
GetAssocBusComp
GetFieldValue
GetFormattedFieldValue
GetLastErrCode
GetLastErrText
GetMVGBusComp
GetNamedSearch
GetPickListBusComp
GetSearchExpr

Version 6.0

Siebel Object Interfaces Reference

3-15

Interfaces Reference
Object Interface Methods Tables

Table 3-2.

Thin Client Methods

(Sheet 3 of 5)

Interface

Method

Business Component
(Continued)

GetSearchSpec
GetUserProperty
GetViewMode
InvokeMethod
LastRecord
Name
NewRecord
NextRecord
NextSelected
ParentBusComp
Pick
PreviousRecord
RefineQuery
SetFieldValue
SetFormattedFieldValue
SetNamedSearch
SetSearchExp
SetSearchSpec
SetSortSpec
SetUserProperty
SetViewMode
SuppressNotification
UndoRecord
WriteRecord

3-16

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Object Interface Methods Tables

Table 3-2.

Thin Client Methods

(Sheet 4 of 5)

Interface

Method

Business Object

GetBusComp
GetLastErrCode
GetLastErrText
Name

Business Service

GetFirstProperty
GetNextProperty
GetProperty
InvokeMethod
PropertyExists
RemoveProperty
SetProperty

PropertySet

AddChild
Copy
GetChild
GetChildCount
GetFirstProperty
GetNextProperty
GetProperty
GetType
GetValue
InsertChildAt
PropertyExists
RemoveChild
RemoveProperty

Version 6.0

Siebel Object Interfaces Reference

3-17

Interfaces Reference
Object Interface Methods Tables

Table 3-2.

Thin Client Methods

Interface

Method

PropertySet ()

Reset

(Sheet 5 of 5)

SetProperty
SetType
SetValue
WebApplet

BusComp
BusObject
InvokeMethod
Name

3-18

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Object Interface Events

Object Interface Events

The object interface events are available only in Siebel VB or Siebel eScript within
Siebel Tools. Table 3-3 lists the Siebel interface events, grouped by object interface
type.
Table 3-3.

Interfaces and Events

(Sheet 1 of 2)

Interface

Event

Applet

ChangeRecord
ChangeFieldValue
ChangeRecord
GotFocus
InvokeMethod
Load
LostFocus
PreInvokeMethod

Application/Data Control

Close
InvokeMethod
PreClose
PreInvokeMethod
Start

Business Component

Associate
ChangeRecord
CopyRecord
DeleteRecord
InvokeMethod
NewRecord

Version 6.0

Siebel VB

Siebel eScript









































Siebel Object Interfaces Reference

3-19

Interfaces Reference
Object Interface Events

Table 3-3.

Interfaces and Events

Interface

Event

Business Component
()

PreAssociate

(Sheet 2 of 2)

PreCopyRecord
PreDeleteRecord
PreGetFieldValue
PreInvokeMethod
PreNewRecord
PreQuery
PreSetFieldValue
PreWriteRecord
Query
SetFieldValue
WriteRecord

Service

InvokeMethod
PreInvokeMethod

Web Applet

InvokeMethod
PreInvokeMethod
ShowControl
ShowListColumn

Miscellaneous

3-20

Click

Siebel Object Interfaces Reference

Siebel VB

Siebel eScript









































Version 6.0

Interfaces Reference
Object Interface Events

Table 3-4 lists the event handlers supported in the Siebel Thin Clients. For
UNIX-based and Windows-based Client Applications Managers, business
component event handlers are all supported and run on the Client Applications
Manager, as are external DLL files and shell functions. Applet and control event
handlers don't run, because client-side scripting is not supported on the thin clients.
(Web controls are supported in the HTML thin client.) However, you can
simulate events such as a button click using the Method Invoked property and
the BusComp_PreInvokeMethod.
Table 3-4.

Thin Client Events

(Sheet 1 of 2)

Interface

Event

Application/Data Control

Application_Close
Application_InvokeMethod
Application_PreInvokeMethod
Application_Start

Business Component

BusComp_Associate
BusComp_ChangeRecord
BusComp_CopyRecord
BusComp_DeleteRecord
BusComp_InvokeMethod
BusComp_NewRecord
BusComp_PreAssociate
BusComp_PreDeleteRecord
BusComp_PreGetFieldValue
BusComp_PreInvokeMethod
BusComp_PreNewRecord
BusComp_PreQuery
BusComp_PreSetFieldValue
BusComp_PreWriteRecord

Version 6.0

Siebel Object Interfaces Reference

3-21

Interfaces Reference
Object Interface Events

Table 3-4.

Thin Client Events

(Sheet 2 of 2)

Interface

Event

Business Component
()

BusComp_Query
BusComp_SetFieldValue
BusComp_WriteRecord

Business Service

Service_InvokeMethod
Service_PreInvokeMethod

Web Applet

WebApplet_InvokeMethod
WebApplet_PreInvokeMethod
WebApplet_ShowControl
WebApplet_ShowListColumn

3-22

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Siebel Constants

Siebel Constants

The Siebel programming languages provide a number of constants for the


convenience of programmers. These constants appear in Table 3-5. It is strongly
recommended that you use the constant names, rather than their integer values, in
your code. Use of these constant names makes your code more readable by others,
because it clarifies your intentions. However, the integer values are included to aid
in debugging, as the integer values are what will appear in the Debugger.
Table 3-5.

Version 6.0

Siebel Constants

(Sheet 1 of 2)

Used With

Constant Name

Integer Value

MsgBox Method

mbOKOnly

mbOKCancel

mbAbortRetryIgnore

mbYesNoCancel

mbYesNo

mbRetryCancel

mbCritical

16

mbQuestion

32

mbExclamation

48

mbInformation

64

mbDefaultButton1

000

mbDefaultButton2

256

mbDefaultButton3

512

mbApplicationModal

mbSystemModal

4096

mbOK

mbCancel

Siebel Object Interfaces Reference

3-23

Interfaces Reference
Siebel Constants

Table 3-5.

Siebel Constants

(Sheet 2 of 2)

Used With

Constant Name

Integer Value

MsgBox Method
()

mbAbort

mbRetry

mbIgnore

mbYes

mbNo

ContinueOperation

CancelOperation

OperationComplete1

ForwardBackward

ForwardOnly

NewBefore

NewAfter

NewBeforeCopy

NewAfterCopy

SalesRepView

ManagerView

PersonalView

AllView

NoneSetView

Pre Event Handler Methods

Search Methods

NewRecord Method

SiebelViewMode Methods

1. This constant is obsolete, but can still be used.

3-24

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

Applet Methods

In the following methods, the placeholder oApplet in the syntax refers to a variable
representing a specific applet.

ActiveControl

ActiveControl returns the control that currently has the input focus within the
applet.
Syntax

oApplet.ActiveControl
Argument

Description

Not applicable

Returns

The control object that has focus.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

In Siebel VB:
Dim
Dim
set
set

oCtrlObj as Object
oSa as Applet
oSa = theApplication.ActiveApplet()
oCtrlObj = sa.ActiveControl()

In Siebel eScript:
var sa = TheApplication().ActiveApplet();
var ctrlObj = sa.ActiveControl();

Version 6.0

Siebel Object Interfaces Reference

3-25

Interfaces Reference
Applet Methods

BusComp

BusComp returns the business component that is associated with the applet.
oApplet.BusComp

Syntax

Argument

Description

Not applicable

Returns

The business component associated with the applet.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

This COM example creates a macro that uses the Siebel Automation Server to add
Account records using the data in the Excel spreadsheet cells.
Dim TheApplication As SiebelApplicationServer.SiebelApplication
Dim SiebelBC As SiebelBusComp
Dim SiebelApplet As SiebelApplet
Dim errCode As Integer
On Error GoTo DisplayError
Set TheApplication = GetObject("", _
"SiebelAppServer.ApplicationObject")
With TheApplication
.GotoView "Account List View", Nothing, errCode
On errCode GoTo DisplayError ' will raise VB error if > 255
Set SiebelApplet = .FindApplet("Account List Applet", errCode)
On errCode GoTo DisplayError
.GotoApplet SiebelApplet, errCode
On errCode GoTo DisplayError
End With
Set SiebelBC = SiebelApplet.BusComp(errCode)
On errCode GoTo DisplayError

3-26

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

With SiebelBC
.NewRecord NewAfter, errCode
.SetFieldValue "Name", CStr(ActiveSheet.Cells(8, 1).Value), _
errCode
.WriteRecord errCode
.NewRecord NewAfter, errCode
.SetFieldValue "Name", CStr(ActiveSheet.Cells(9, 1).Value), _
errCode
.WriteRecord errCode
End With
Set SiebelBC = Nothing
Set TheApplication = Nothing
Exit Sub
DisplayError:
Dim ErrText As String
If errCode <> 0 Then
' Siebel error
ErrText = TheApplication.GetLastErrText
MsgBox ErrText
Else
' is Non-Siebel error
MsgBox Err.Description & " VB Error " & Err.Number
End If
Set SiebelBC = Nothing
Set TheApplication = Nothing
Exit Sub

Version 6.0

Siebel Object Interfaces Reference

3-27

Interfaces Reference
Applet Methods

BusObject

BusObject returns the business object for the business component for the applet.
oApplet.BusObject

Syntax

Argument

Description

Not applicable

Returns

The business object for the applets business component.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

In Siebel VB:
Dim oApplet as Applet
Dim oBusObject as BusObject
Dim oBusComp as BusComp
Set oBusObject = oApplet.oBusObject()

3-28

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

Drilldown

Drilldown navigates to the view that corresponds to the argument-specified


Drilldown object.
Syntax

oApplet.Drilldown(drilldown_object)
Argument

Description

drilldown_object

Literal string or string variable containing the name of the drilldown


object

Returns

Not applicable

Usage

A Drilldown object is a child object of applet, used primarily in list applets. It allows
the user to navigate from a cell in a List view to a view that is specific to the cell
the user clicks in. The hyperlinked field and the destination view are defined in the
Drilldown objects properties. Refer to the Siebel Tools Guide for the list of Drilldown
object properties.
NOTE: This functionally can also be implemented through configuring a dynamic

drill-down in Siebel Tools. For details, see the Siebel Tools Guide.

Used With

Version 6.0

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Siebel Object Interfaces Reference

3-29

Interfaces Reference
Applet Methods

Example

Because different activities include different fields, we implemented different detail


views for each activity type. This example shows how to drill down from the activity
list to the specific view.
Sub Button1_Click
' This button is on the Activity List Applet with Navigation
Dim sType As String
Dim oApplet As Applet
Dim oBC As BusComp
' For the button control, "Me" refers to the Applet containing
' the button
Set oApplet = Me
Set oBC = oApplet.BusComp
' Get the current Finance Activity Type
sType = theApplication.Me.GetFieldValue("Type")
Select Case sType
Case "FYI"
DrillDown "Account"
Case "Call"
DrillDown "Opportunity"
End Select
Set oApplet = Nothing
Set oBC = Nothing
End Sub

3-30

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

FindActiveXControl

FindActiveXControl returns the ActiveX control whose name is specified in the


argument.
Syntax

oApplet.FindActiveXControl(controlName)
Argument

Description

controlName

Literal string or string variable containing the name of the desired control

Returns

The control object identified in controlName.

Used With

Siebel VB, Siebel eScript, COM Automation Server

Example

In Siebel VB:
Dim oCal as Object
Dim oApplet as Applet
set oCal = oApplet.FindActiveXControl(Calendar1)
oCal.day = 10
oCal.month = 5

Version 6.0

Siebel Object Interfaces Reference

3-31

Interfaces Reference
Applet Methods

FindControl

FindControl returns the control whose name is specified in the argument. This
applet must be part of the displayed view.
oApplet.FindControl(controlName)

Syntax

Argument

Description

controlName

Literal string or string variable containing the name of the desired control

Returns

The control object identified in controlName.

Usage

FindControl will not find controls for MVG applets, Pick applets, Associate applets,
or detail applets that are not on the views applet list.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a COM example:


Private Sub GotoSiebelControl()
Dim errCode As Integer
Dim oApplet As SiebelApplet
Dim oControl as SiebelControl
Set oApplet = SiebelApplication.ActiveApplet
If errCode = 0 And Not oApplet Is Nothing Then
Set oControl = oApplet.FindControl("Calendar", errCode)
If errCode = 0 And Not oControl Is Nothing Then
Applet.GotoControl oControl, errcode
End If
End If
Status.Text = SiebelApplication.GetLastErrText
End Sub

3-32

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

GotoControl

GoToControl navigates to the control specified in its argument.


Syntax

oApplet.GoToControl(controlObject)
Argument

Description

controlObject

A control object

Returns

Not applicable

Usage

The control argument for GotoControl must first be obtained via FindControl or
ActiveControl. For an applet object, the first control in the defined tab order gets
focus. Note that only applets and controls in the current (actively visible) view are
available. Applets called through a toggle are not accessible. For these reasons, this
method cannot be used within an Applet_GotFocus event.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a COM example:


Private Sub GotoSiebelControl(4)
Dim errCode As Integer
Dim oApplet As SiebelApplet
Dim oControl as SiebelControl
Set oApplet = SiebelApplication.ActiveApplet
If errCode = 0 And Not oApplet Is Nothing Then
Set oControl = oApplet.FindControl(GotoControl.Text, errCode)
If errCode = 0 And Not oControl Is Nothing Then
Applet.GotoControl oControl, errcode
End If
End If
Status.Text = SiebelApplication.GetLastErrText
End Sub

See Also

Version 6.0

FindControl on page 3-32, GotoApplet on page 3-63

Siebel Object Interfaces Reference

3-33

Interfaces Reference
Applet Methods

InvokeMethod

The InvokeMethod method calls the specialized method specified in its argument.
VB Syntax

oApplet.InvokeMethod(methodName, methodArgs)
Argument

Description

methodName

The name of the method

methodArgs

Arguments can be a single string or an array of strings

Applet.InvokeMethod(methodName, methArg1, methArg2, ..., methArgn);

eScript
Syntax

Argument

Description

methodName

The name of the method

methArg1, methArg2, ..., methArgn

One or more strings containing arguments to


methodName

Returns

A string containing the method return value.

Usage

InvokeMethod allows you to call methods on an applet object that are not exposed
through the applet interface. You can add an additional argument to the function
call; for example:
Dim Arguments(3) as String
Applet.InvokeMethod (MethodName, Arguments)

You can use InvokeMethod to call the following specialized methods in certain
applets: RunCallScript, ScriptCallFinish, CallScriptCancel. Usage of the these
methods is described in the Siebel SmartScript Guide.
This method should be used only with supported methods.
Used With

3-34

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

Example

Here is a Siebel VB example:


Dim oApplet As Object
Dim sArgs(3) As String
sArgs(0) = "Demo Opportunity Profile"
sArgs(1) = ""
sArgs(2) = ""
oApplet.InvokeMethod "RunCallScript", args

Version 6.0

Siebel Object Interfaces Reference

3-35

Interfaces Reference
Applet Methods

Name

The Name method returns the name of the applet.


oApplet.Name

Syntax

Argument

Description

Not applicable

Returns

A string containing the applet object name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a Siebel VB example:


Dim oApplet as Applet
Dim sTxt as String
Set oApplet = theApplication.ActiveApplet
sTxt = oApplet.Name

3-36

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Methods

PostChanges

PostChanges posts changes that are made in an applet.


Syntax

oApplet.PostChanges
Argument

Description

Not applicable

Returns

An integer in Siebel VB, a Boolean in Siebel eScript, COM, and ActiveX: 1 if it


successfully posted the change and 0 if it did not post the change.

Usage

Use PostChanges to flush any uncommitted input in the active control back to the
BusComp, as occurs when a user tabs out of the field. PostChanges does not commit
the entire row of data to the database, only the user input in one of the active
controls. Call PostChanges to ensure that the users input has been validated (for
example, satisfies a bounded picklist) before performing another operation such as
GetFieldValue. If PostChanges is not called, GetFieldValue returns the original value,
not the value that the user entered.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Version 6.0

Siebel Object Interfaces Reference

3-37

Interfaces Reference
Applet Events

Applet Events

Applet_ChangeFieldValue

The ChangeFieldValue event is fired when the data in a field changes.


Applet_ChangeFieldValue FieldName FieldValue

Syntax

Parameter

Description

FieldName

A string representing the name of the field whose value is to be changed

FieldValue

A string representing the new value to be assigned to FieldName

Returns

Not applicable

Usage

ChangeFieldValue is fired when the data in a field changes, but not when a user
moves to a different record without changing a value in the previous record. If a
user changes the value in a field and other dependent fields, such as calculated
fields, change as a result, the event is fired once for each field whose value is
changed.

Used With

Siebel VB, Siebel eScript

Example

Here is a Siebel eScript example:


function Applet_ChangeFieldValue(FieldName , FieldValue)
{
TheApplication().MsgBox("Frame ChangeField:" + FieldName +
" to: " + FieldValue);
}

See Also

3-38

Applet_ChangeRecord on page 3-39

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Events

Applet_ChangeRecord

The ChangeRecord event is called when the user moves to a different row.
Syntax

Applet_ChangeRecord
Parameter

Description

Not applicable

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

Example

Here is a Siebel VB example:


Sub Applet_ChangeRecord
msgbox("Frame ChangeRecord")
End Sub

See Also

Version 6.0

Applet_ChangeFieldValue on page 3-38

Siebel Object Interfaces Reference

3-39

Interfaces Reference
Applet Events

Applet_GotFocus

The GotFocus event is called when an applet gets the focus. An applet gets the focus
when one of the following occurs: (1) the user navigates to a view in which the
applet is the default applet, (2) the user clicks on a control in the applet while
another applet is active, (3) a Pick applet, an MVG applet, a detail applet, or an
association dialog, invoked in the applet, is closed.
Applet_GotFocus

Syntax

Argument

Description

Not applicable

The GotFocus event is called any time the focus is moved to the applet from any
other applet, regardless of whether the other applet is another sector applet of the
same view, an applet from a different view, or a dialog box (such as a Pick applet,
an MVG applet, a Detail applet, or an Association dialog box).

Usage

The applet that receives focus in the Applet_GotFocus script does not become the
active applet until the Applet_GotFocus script has finished executing. Therefore,
you cannot call functions that assume the applet is active (such as GoToControl or
GoToApplet) within an Applet_GotFocus script.
NOTE: A static picklist that is auto-generated at run time is considered a control
embedded in the applet on which it resides, and opening it does not change the
focus.

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

3-40

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Events

Example

Here is a Siebel VB example.


Sub Applet_GotFocus
Dim sArea As String, sLength As String
Dim oCurrBC as BusComp
Set oCurrBC = theApplication.ActiveBusComp
sArea = oCurrBC.GetFieldValue("Area")
sLength = Len(sArea)
oCurrBC.SetFieldValue "Length",sLength
End Sub

Here is an equivalent Siebel eScript example.


function Applet_GotFocus ()
{
var Area;
var Length;
var CurrBC;
CurrBC = TheApplication().ActiveBusComp()
Area = CurrBC.GetFieldValue("Area");
Length = Area.length;
CurrBC.SetFieldValue("Length",Length);
}

Version 6.0

Siebel Object Interfaces Reference

3-41

Interfaces Reference
Applet Events

Applet_InvokeMethod

The InvokeMethod event is triggered by a call to applet.InvokeMethod or a


specialized method, or by a user-defined menu.
Applet_InvokeMethod

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

Typical uses include showing or hiding controls, or setting a search specification.


When accessing a business component from this event handler, use me.BusComp,
rather than theApplication.ActiveBusComp.

Used With

Siebel VB, Siebel eScript

See Also

Applet_PreInvokeMethod on page 3-46, Application_InvokeMethod on page 3-92

3-42

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Events

Applet_Load

The Load event is triggered when an applet is loaded.


Syntax

Applet_Load
Parameter

Description

Not applicable

Returns

Not applicable

Usage

You can use this event for purposes such as hiding a few controls on the applet or
defining the business component search specification.

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-43

Interfaces Reference
Applet Events

Applet_LostFocus

The LostFocus event is called when an applet loses focus. An applet loses focus
when one of the following occurs: (1) the user navigates to another view, (2) the
user clicks on a control in another applet, (3) a Pick applet, an MVG applet, a Detail
applet, or an Association dialog box is displayed, (4) a user exits the Siebel
application.
Applet_LostFocus

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

The LostFocus event is called any time the focus is moved away from the applet to
any other applet, regardless of whether the other applet is another sector applet of
the same view, an applet from a different view, or a dialog box applet (such as a
Pick applet, an MVG applet, a Detail applet, or an association dialog box).
Applet_LostFocus is triggered as soon as the user clicks a field containing such an
applet.
NOTE: A static picklist that is auto-generated at run time is considered a control
embedded in the applet on which it resides, and opening it does not change
the focus.

Used With

3-44

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Events

Example

Here is an example implementation of Applet_LostFocus:


Private Sub Applet_LostFocus()
Dim errCode As Integer
Dim Applet As SiebelApplet
Dim Control as SiebelControl
Set Applet = SiebelApplication.ActiveApplet(errCode)
If errCode = 0 And Not Applet Is Nothing Then
Set Control = Applet.FindControl(GotoControl.Text, errCode)
If errCode = 0 And Not Control Is Nothing Then
AppletGotoControl Control, errcode
End If
End If
Status.Text = SiebelApplication.GetLastErrText
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-45

Interfaces Reference
Applet Events

Applet_PreInvokeMethod

The PreInvokeMethod event is called before a specialized method is invoked by the


system, by a user-defined applet menu, or by calling InvokeMethod on an applet.
Applet_PreInvokeMethod(methodName)

Syntax

Argument

Description

methodName

String variable or literal containing the name of the method invoked

Returns

ContinueOperation or CancelOperation

Usage

The PreInvokeMethod event is called just before a specialized method is invoked on


the applet. If implementing a new method (not defined by the built-in functions),
the Basic script should return CancelOperation to avoid invoking an Unknown
Method Name error. Specialized methods are methods based on applet or business
component classes other than CSSFrame and CSSBusComp, respectively, that is,
specialized classes.
CancelOperation does not stop the execution of the code following it, but it does
prevent the execution of any built-in code associated with this event.
Applet_PreInvokeMethod should return CancelOperation when you are handling
the event entirely through scripting and dont want the built-in code to execute.
However, if there is code in the same script following CancelOperation, that code
will run regardless of the CancelOperation.

Used With

3-46

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Applet Events

Example

Here is an example implementation of Applet_PreInvokeMethod.


Function Applet_PreInvokeMethod (MethodName As String) As Integer
On Error Resume Next
Dim iReturn As Integer
Dim oBC As BusComp
iReturn = ContinueOperation
Select Case MethodName
Case "InactivateAccount"
Set oBC = me.Buscomp
oBC.ActivateField "Status"
oBC.SetFieldValue "Status", "Inactive"
iReturn = CancelOperation
Set oBC = Nothing
Case "ActivateAccount"
Set oBC = me.Buscomp
oBC.ActivateField "Status"
oBC.SetFieldValue "Status", "Active"
iReturn = CancelOperation
Set oBC = Nothing
End Select
Applet_PreInvokeMethod = iReturn
End Function

See Also

Version 6.0

How Your Script Affects Program Flow on page 2-76

Siebel Object Interfaces Reference

3-47

Interfaces Reference
Application Methods

Application Methods

In the method and property descriptions that follow, Application represents a


constant that stands for the Siebel application. When called from an external
interface, this constant is SiebelApplication. From within Siebel Tools, the
constant is theApplication or TheApplication in Siebel VB, and
TheApplication() in Siebel eScript.

ActiveApplet

ActiveApplet returns the name of the applet that has input focus.
Application.ActiveApplet

Syntax

Argument

Description

Not applicable

Returns

The name of the applet instance that has focus.

Usage

Use this method to determine which applet currently has focus. The applet typically
has a red border to show that it is active. (This property can be changed through
configuration in Siebel Tools.) An external application can verify the active applet.
Do not use ActiveApplet in any event handler that may be initiated by the COM Data
Server or ActiveX Data Server.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Sample use of ActiveApplet in Siebel VB:


Dim applet as Applet
Set applet = theApplication.ActiveApplet
If applet.name = "Service Request" Then
...
End If

3-48

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

ActiveBusComp

ActiveBusComp returns the business component associated with the active applet.
Syntax

Application.ActiveBusComp
Argument

Description

Not applicable

Returns

The business component associated with the active applet.

Usage

Do not use ActiveBusComp in any event handler that may be initiated by the COM
Data Server or ActiveX Data Server.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a Siebel VB example:


Dim CurrOppty As BusComp
Set CurrOppty = theApplication.ActiveBusComp
MsgBox("The active business component is " & CurrOppty.Name & ".")

Version 6.0

Siebel Object Interfaces Reference

3-49

Interfaces Reference
Application Methods

ActiveBusObject

ActiveBusObject returns the business object for the business component for the
active applet.
Application.ActiveBusObject

Syntax

Argument

Description

Not applicable

Returns

The business object that contains the business component associated with the
active applet.

Usage

Do not use ActiveBusObject in any event handler that may be initiated by the COM
Data Server or ActiveX Data Server.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a Siebel VB example:


Dim oBusObj As BusObject
Set oBusObj = theApplication.ActiveBusObject
MsgBox("The active business object is " & oBusObj.Name & ".")

3-50

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

ActiveControl

ActiveControl returns the control that has the input focus. Input focus is set when
(1) the end user clicks the control with the mouse or navigates to the control using
the keyboard, or (2) a program navigates to the control via a call to GotoControl.
Syntax

Application.ActiveControl
Argument

Description

Not applicable

Returns

The control object that has input focus.

Usage

Do not use ActiveControl in any event handler that may be initiated by the COM
Data Server or ActiveX Data Server.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Version 6.0

Siebel Object Interfaces Reference

3-51

Interfaces Reference
Application Methods

Example

Here is a COM Automation Server example.


Private Sub GetActiveObjects_Click()
Dim errCode As Integer
ActiveBusObject.Text = ""
ActiveBusComp.Text = ""
ActiveApplet.Text = ""
ActiveControl1.Text = ""
ActiveControlValue.Text = ""
Set
Set
Set
Set

SBusObject = Nothing
SBusComp = Nothing
SApplet = Nothing
SControl = Nothing

If Not SiebelApplication Is Nothing Then


Set SBusObject = SiebelApplication.ActiveBusObject(errCode)
If errCode = 0 And Not SBusObject Is Nothing Then
ActiveBusObject.Text = SBusObject.Name(errCode)
End If
If errCode = 0 Then
Set SBusComp = SiebelApplication.ActiveBusComp(errCode)
End If
If errCode = 0 And Not SBusComp Is Nothing Then
ActiveBusComp.Text = SBusComp.Name(errCode)
End If
If errCode = 0 Then
Set SApplet = SiebelApplication.ActiveApplet(errCode)
End If
If errCode = 0 And Not SApplet Is Nothing Then
ActiveApplet.Text = SApplet.Name(errCode)
End If
If errCode = 0 Then
Set SControl = SiebelApplication.ActiveControl (errCode)
End If
If errCode = 0 And Not SControl Is Nothing Then
ActiveControl1.Text = SControl.Name(errCode)
End If
End If
Status.Text = SiebelApplication.GetLastErrText
End Sub

3-52

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

ActiveViewName

ActiveViewName returns the name of the active view.


Syntax

Application.ActiveViewName
Argument

Description

Not applicable

Usage

Do not use ActiveViewName in any event handler that may be initiated by the COM
Data Server or ActiveX Data Server.

Returns

A string containing the active view name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Version 6.0

Siebel Object Interfaces Reference

3-53

Interfaces Reference
Application Methods

CurrencyCode

CurrencyCode returns the operating currency code associated with the division to
which the users position has been assigned.
Application.CurrencyCode

Syntax

Argument

Description

Not applicable

Returns

A string containing the currency code; for example, USD for U.S. dollars, EUR for
the Euro, JPY for the Japanese Yen.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*
* Implemented as an attribute.

3-54

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

EnableExceptions

The EnableExceptions method enables or disables native COM error handling.


Syntax

ApplicationControl.EnableExceptions(bEnable)
Argument

Description

bEnable

A Boolean: TRUE or FALSE

Returns

Not applicable

Usage

Setting the argument to TRUE enables native COM error handling. This allows
applications to intercept and display the exception ID and description. Native COM
error handling is disabled by default.

Used With

ActiveX Application Control, ActiveX Data Control

Version 6.0

Siebel Object Interfaces Reference

3-55

Interfaces Reference
Application Methods

FindApplet

FindApplet returns the applet that is identified by the appletName argument.


Application.FindApplet(appletName)

Syntax

Argument

Description

appletName

String variable or literal containing the name of the desired applet

Returns

The applet identified in appletName.

Usage

The only applets available are applets in the active view (including applets
accessible only through a Toggle operation).

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a Siebel VB example:


Dim opptyApplet as Applet
Set opptyApplet = theApplication.FindApplet("Opportunity List
Applet")

See Also

3-56

GotoApplet on page 3-63

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

GetBusObject

GetBusObject method instantiates and returns a new instance of the business object
specified in its argument.
Syntax

Application.GetBusObject(busObjectName)
Argument

Description

busObjectName

String variable or literal containing the name of the business object to


instantiate

Returns

The business object instance specified in the argument.

Usage

Set the business object to Nothing to destroy the instantiated business object after
it is no longer needed.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example:


Dim oActionBO as BusObject
Set oActionBO = theApplication.GetBusObject("Action")
Set oActionBO = Nothing

Version 6.0

Siebel Object Interfaces Reference

3-57

Interfaces Reference
Application Methods

GetLastErrCode

The GetLastErrCode method returns the last error code.


Application.GetLastErrCode

Syntax

Argument

Description

Not applicable

Returns

A short integer containing the last error code. 0 indicates no error.

Usage

After execution of a method, the GetLastErrCode can be invoked to check if any


error was returned from the previous operation. GetLastErrText method can be
invoked to retrieve the text of the error message.

Used With

ActiveX Application Control, ActiveX Data Control

Example

Here is an ActiveX example:


errcode = SiebelApplication.GetLastErrCode
If errcode <> 0 Then
ErrText = SiebelApplication.GetLastErrText
MsgBox ErrText
Exit Sub
End If

See Also

3-58

GetLastErrText on page 3-59

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

GetLastErrText

The GetLastErrText method returns the last error text message.


Syntax

Application.GetLastErrText
Argument

Description

Not applicable

Returns

The last error text message as a String.

Used With

COM Automation Server, COM Data Server, ActiveX Application Control, ActiveX
Data Control, CORBA Object Manager

Example

Here is an ActiveX example:


errcode = SiebelApplication.GetLastErrCode
If errcode <> 0 Then
ErrText = SiebelApplication.GetLastErrText
MsgBox ErrText
Exit Sub
End If

See Also

Version 6.0

GetLastErrCode on page 3-58

Siebel Object Interfaces Reference

3-59

Interfaces Reference
Application Methods

GetProfileAttr

GetProfileAttr returns the value of an attribute in a user profile.


GetProfileAttr(name)

Syntax

Parameter

Description

name

A string indicating the name of the attribute

Returns

The value of the attribute name.

Usage

GetProfileAttr is used in personalization to retrieve values of attributes in a user


profile.

Used With

Siebel VB, Siebel eScript

See Also

SetProfileAttr on page 3-83

Example

This example checks if the Profile Attribute Hobby has been set. If it has not been
set, it asks the user and sets the Profile Attribute to the input value. For an
equivalent example in Siebel eScript, see SetProfileAttr on page 3-83.
Sub Button1_Click
Dim Hobby As String
Hobby = TheApplication.GetProfileAttr("Hobby")
If Hobby = "" Then
Hobby = InputBox("Please enter your favorite hobby")
theApplication.SetProfileAttr "Hobby", Hobby
End If
End Sub

3-60

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

GetService

The GetService method returns a specified service. If the service is not already
running, it will be constructed.
Syntax

Application.GetService(serviceName)
Parameter

Description

serviceName

The name of the service to start

Returns

Not applicable

Usage

This method finds the business service indicated by serviceName; it constructs the
service if it is not already running. It first searches through the built-in services that
are stored in the repository. If the service is not found, GetService searches through
services defined in the run-time Business Services table.
A business service is normally deleted from memory as soon as all references to it,
such as local or global variables, are cleared by setting them to another value.
However, if the Cache flag on the business service is set, the service remains in
memory as long as the Siebel application is running.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

For an example, see SetProperty on page 3-198.

Version 6.0

Siebel Object Interfaces Reference

3-61

Interfaces Reference
Application Methods

GetSharedGlobal

The GetSharedGlobal method gets the shared user-defined global variables.


Application.GetSharedGlobal(varName)

Syntax

Returns
Usage

Argument

Description

varName

String literal or variable containing the name of the global variable

A string containing the user-defined global variables.


GetSharedGlobal("varName")
retrieves the string set by
SetSharedGlobal "varName", "stringValue".

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, CORBA Object
Manager*

Example

Here is a Siebel VB example:


theApplication.SetSharedGlobal "myVar", "a value"
myVar2 = theApplication.GetSharedGlobal("myVar")

Here is a COM example:


oleVar = SiebelApplication.GetSharedGlobal("myVar", errCode)
SiebelApplication.SetSharedGlobal "myVar", "a value", errCode

See Also

SetSharedGlobal on page 3-82


* Implemented as an attribute.

3-62

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

GotoApplet

The GotoApplet method sets the focus to the specified applet.


Syntax

Application.GotoApplet(AppletObject)
Argument

Description

AppletObject

Applet object to set focus to

Returns

Not applicable

Usage

The first control in the defined tab order gets focus. Note that only applets actively
visible on the current view are available. Applets called through a toggle are not
accessible, nor are pop-up applets such as pick applets, MVG applets, detail applets,
or association applets.
NOTE: This method cannot be used within an Applet_GotFocus event.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

See Also

FindApplet on page 3-56, GotoControl on page 3-33

Example

For an example, see BusComp on page 3-26.

Version 6.0

Siebel Object Interfaces Reference

3-63

Interfaces Reference
Application Methods

GotoView

GotoView activates the named view and its BusObject. As a side effect, this method
activates the views primary applet and its BusComp and activates the primary
applets first tab sequence control. Further, this method deactivates any BusObject,
BusComp, applet, or control objects that were active prior to this method call.
Application.GotoView(ViewName[, BusinessObjectName])

Syntax

Argument

Description

ViewName

The name of the view for the Siebel application to display

BusinessObjectName

An optional parameter to specify the business object to use for


displaying the view. You cannot specify the current active business
object as an argument to GotoView. If this argument is not
supplied, or is specified as Nothing, a new business object will be
loaded in the normal fashion

Returns

Not applicable

Usage

If a business object has not been instantiated, BusinessObjectName should have the
value Nothing.
An example use of the GotoView method is to programmatically navigate to the
Opportunity List view.
theApplication.GotoView "Opportunity List View", Nothing
When this method is used from an external program (a COM Automation Server),
the usage is as follows:
ObjectReference.GotoView("Opportunity List View", Nothing,
errCode)
Alternatively, if your application has already instantiated an Opportunity object
with the object reference of objOppty, the appropriate usage in Siebel VB is:
theApplication.GotoView("Opportunity List View", objOppty)

3-64

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

When this method is used from an external program (a COM Automation Server),
the usage is as follows:
ObjectReference.GotoView("Opportunity List View",
OpptyObj, errCode)
NOTE: When this method is used in a Siebel VB or eScript script, regardless of where
it appears in the script, it is executed last. However, when GoToView is invoked
from an external program, it is executed immediately. The GoToView method goes
to a new screen, with the result that the screen in which the method is executing is
destroyed, and the executing script along with it, causing a crash. To avoid this
behavior, make the call to GoToView the last executable statement in the script.
This method cannot be used in an Applet_GotFocus event.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

GoToView doesn't maintain its context unless it is executed following a search


specification. The following Siebel eScript example shows how to maintain only the
current row:
function Button_Click ()
{
var qt;
// Active BusComp
var qtId;
// Id Field
var qtObj; // Quote BusObject
var qtComp; // Quote BusComp
qt = TheApplication().ActiveBusComp();
qtId = qt.GetFieldValue("Id");
qtObj = TheApplication().GetBusObject("Quote");
qtComp = qtObj.GetBusComp("Quote")
with (qtComp)
{
SetViewMode(AllView);
ClearToQuery();
ActivateField("Id");
SetSearchSpec("Id", qtId);
ExecuteQuery(ForwardBackward);
}
TheApplication().GoToView("Quote's New View", qtObj);
}

Version 6.0

Siebel Object Interfaces Reference

3-65

Interfaces Reference
Application Methods

InputBox

The InputBox method prompts the user for input and is similar to the Microsoft
Visual Basic InputBox method. For compatibility with Siebel VB, InputBox can also
be accessed as a global method.
VB Syntax

variableName = [Application.]InputBox(prompt [, title] [, default] [, xpos] [, ypos])

eScript
Syntax

variableName =TheApplication().InputBox(prompt [, title] [, default] [, xpos]


[, ypos]);
Argument

Description

variableName

A variable to hold the input value; must be either String or Variant in


Siebel VB

Application

An optional variable to refer to the application; conventionally,


theApplication

prompt

Text for prompting the user for input

title

Title to appear in title bar

default

Default input value

xpos

Horizontal position of the upper left corner of the input box

ypos

Vertical position of the upper left corner of the input box

Returns

A string containing the user input or, if the user typed no input, the default
input value.

Used With

Siebel VB, Siebel eScript

3-66

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

Example

This VB is used to avoid duplicate entry of accounts. It is invoked on the click of a


button. It pops up a box to enter a company name. If the account is found, it will
populate the form with the appropriate details.
Sub Account1_Click
Dim CoName As String
Dim CurrOpptyBusComp As BusComp
CoName = Inputbox("Enter Company Name","Address Validation")
InvokeMethod("NewRecord")
Set CurrOpptyBusComp = TheApplication.ActiveBusComp
On Error Goto Errhdlr1
CurrOpptyBusComp.SetFieldValue "Account", CoName
' This Section simulates finding a Company with an Account Number
' This has been based on the assumption that the account existed.
CurrOpptyBusComp.SetFieldValue "Existing Cust" , "Y"
Exit Sub
Errhdlr1:
MsgBox "Name Not Found Please Use Search",0, _
"Unidentified Company"
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-67

Interfaces Reference
Application Methods

InvokeMethod

InvokeMethod calls a specialized method specified by its argument.


VB Syntax

Application.InvokeMethod(methodName, methodArgs)
Argument

Description

methodName

The name of the method

methodArgs

Arguments to methodName, which can be a single string or an array of


strings

TheApplication().InvokeMethod(methodName, methArg1, methArg2, ...,


methArgn)

eScript
Syntax

Argument

Description

methodName

The name of the method

methArg1, methArg2, ..., methArgn

One or more strings containing arguments to


methodName

Returns

A string containing the method name.

Usage

InvokeMethod enables you to call methods on an Application object that is exposed


directly through the Application interface.
The InvokeMethod method should be used only with documented specialized
methods.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

For an example, see InvokeMethod on page 3-34.

3-68

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

LoadObjects

The LoadObjects method is used to start the COM Data Server object, and returns
a reference to the Application object. This method must be the first call to the COM
Data Server.
Syntax

Application.LoadObjects(pathName\CFGfileName)
Argument

Description

pathName

Directory path to the configuration (.cfg) file

CFGfileName

Name of the .cfg file to open

Returns

The Application object opened on start-up.

Usage

Prior to calling LoadObjects, you must change the current directory to the
Siebel\bin directory.

Used With

COM Data Server

Example

Here is a COM Data Server example.


Private Sub LoadConfig_Click()
Dim errCode As Integer
LoadConfig.Enabled = False
SiebelApplication.LoadObjects "C:\siebel\bin\uagent.cfg", _
errCode
If errCode = 0 Then
ConfigOK = 1
End If
Status.Text = SiebelApplication.GetLastErrText
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-69

Interfaces Reference
Application Methods

Login

The Login method allows external applications to log in to the COM Data Server,
ActiveX Control, Java Data Bean, or CORBA Object Manager and access the Siebel
objects. The Login method allows the end user to invoke the Siebel application
without being prompted for a login and password. The Login method determines
the privileges that will be granted, and the role and responsibility of the end user
for that session.
Application.Login([connectString,] userName, password)

Syntax

Returns

Argument

Description

connectString*

Token-based connect string

userName

Username for login

password

User password for login

A string containing the error code.


* For ActiveX only.

Usage

Verify that the Siebel\bin directory is the current directory. To access the Data
Control, make sure the default Data Source points to the database that you wish to
access and set EnableOLEAutomation to TRUE in your .cfg file (this is the default
value for the parameter). To access the CORBA Object Manager, EnableCORBA must
be set to TRUE.

Used With

COM Data Server, ActiveX Automation Control, ActiveX Data Control, Java Data
Bean, CORBA Object Manager

Example

The Connect string for the ActiveX controls is token-based; for example:
host = "siebel//:my_computer/SIEBEL/objsrvr/my_computer" lang =
"ENU"

3-70

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

Since most languages use quotes to enclose text strings, you must use quotes inside
quotes; for example:
To use the ActiveX controls in Visual Basic:
Login("host=""siebel//my_computer/SIEBEL/objsvr/my_computer"_
"lang=""ENU"", "user", "password")

To use the ActiveX controls in C++:


Login("host=\"siebel//:my_computer/SIEBEL/objsvr/
my_computer\"lang = \"ENU\"",""user","password");

The following code sample illustrates how to log in to the server and check
for errors.
Call SiebelAppControl.Login("host=""siebel//:SOMQA/somsiebel/
ssu""", "", "")
//Check for errors
If SiebelAppControl.GetLastErrCode <> 0 Then
frmMain.txtStatus.Text = SiebelAppControl.GetLasErrText
Else
frmMain.txtStatus.Text = "Connected successfully..."
End If

Version 6.0

Siebel Object Interfaces Reference

3-71

Interfaces Reference
Application Methods

LoginId

The LoginId method returns the login ID of the user who started the Siebel
application.
Application.LoginId

Syntax

Argument

Description

Not applicable

Returns

A string containing the login ID.

Usage

The login ID is the row ID of the users login in the Employee table. Once obtained,
the login ID can be conveniently used as a search specification.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

Example

In this Siebel VB example of BusComp_PreSetFieldValue, the LoginId method is


used to determine whether the user has the right to modify a record.
Function BusComp_PreSetFieldValue (FieldName As String,
FieldValue As String) As Integer
Dim iReturn as integer
iReturn = ContinueOperation
Select Case FieldName
Case "Account Status"
if Me.GetFieldValue("Created By") <> _
TheApplication.LoginId then
MsgBox("*** You cannot change Account Status _
since you did not create the record***")
iReturn = CancelOperation
end if
End Select
BusComp_PreSetFieldValue = iReturn
End Function
* Implemented as an attribute.

3-72

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

LoginName

The LoginName method returns the login name of the user who started the Siebel
application (the name typed in the login dialog box).
Syntax

Application.LoginName
Argument

Description

Not applicable

Returns

A string containing the users login name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

Example

For examples, see ExecuteQuery on page 3-107 and theApplication on page 3-249.

See Also

Login on page 3-70


* Implemented as an attribute.

Version 6.0

Siebel Object Interfaces Reference

3-73

Interfaces Reference
Application Methods

Logoff

The Logoff method disconnects the client from the server.


Application.Logoff

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

For clients with user interfaces, Logoff destroys all windows except for the topmost
window. Logoff also deletes all objects, except for the topmost object, on both client
and server. Logoff is usually used to disconnect from the server and then reconnect
as a different user.
Logoff is called automatically if you destroy the main object.

Used With

3-74

ActiveX Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

MsgBox

The MsgBox method displays a message box and is similar to the Microsoft Visual
Basic MsgBox method. For compatibility with Microsoft Visual Basic, MsgBox can
also be accessed as a global method in Siebel VB.
VB Syntax

[Application.]MsgBox(prompt[, buttons] [, title])

eScript
Syntax

TheApplication().MsgBox(prompt[, buttons] [, title]);


Argument

Description

prompt

Prompt string to appear in the message box

buttons

An integer that represents the button type, the displayed icon, the default
button, and the modality. The integer is the sum of type + icon + default
button + modality. Choose the values from Table 3-6.

title

Title bar text

Table 3-6.

Button Type

Icon

Version 6.0

MsgBox Constants

(Sheet 1 of 2)

Constant Name

Integer Value

Meaning

mbOKOnly

OK button

mbOKCancel

OK, Cancel buttons

mbAbortRetryIgnore

Abort, Retry, Ignore buttons

mbYesNoCancel

Yes, No, Cancel buttons

mbYesNo

Yes, No buttons

mbRetryCancel

Retry, Cancel buttons

mbCritical

16

Critical STOP

mbQuestion

32

Question (?)

mbExclamation

48

Warning (!)

mbInformation

64

Info (i)

Siebel Object Interfaces Reference

3-75

Interfaces Reference
Application Methods

Table 3-6.

MsgBox Constants

Default Button

Modality

Returns

(Sheet 2 of 2)

Constant Name

Integer Value

Meaning

mbDefaultButton1

000

First button is default

mbDefaultButton2

256

Second button is default

mbDefaultButton3

512

Third button is default

mbApplicationModal

The user must respond to the


message box before continuing
work in the current application

mbSystemModal

4096

All applications are suspended


until the user responds to the
message box

An integer value representing the user response. (MsgBox can also be called
without assigning its return value to a variable.)
Return Value

Constant Name

Button Chosen

mbOK

OK

mbCancel

Cancel

mbAbort

Abort

mbRetry

Retry

mbIgnore

Ignore

mbYes

Yes

mbNo

No

Usage

In each group of constants for the buttons argument, the one with the value of
zero (0) is the default. If the buttons argument is omitted, a single OK button
is displayed; however, if the title argument is used, a buttons argument must also
be used.

Used With

Siebel VB, Siebel eScript

3-76

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

Example

Here is a Siebel VB example.


Function BusComp_PreSetFieldValue (FieldName As String, _
FieldValue As String) As Integer
Dim Message As String
Message = "Account BusComp_PreSetFieldValue event triggered"
Message = Message & Chr$(13) & "Field Name = " & FieldName
Message = Message & Chr$(13) & "Field Value = " & FieldValue
theApplication.MsgBox Message, 64, "Internal Message"
BusComp_PreSetFieldValue = ContinueOperation
End Function

Here is the same example in Siebel eScript.


function BusComp_PreSetFieldValue (FieldName, FieldValue)
{
var message = "Account BusComp_PreSetFieldValue event " +
"triggered\n" + "Field Name = " + FieldName +
"\nField Value = " + FieldValue;
TheApplication().MsgBox(message, 64, "Internal Message");
BusComp_PreSetFieldValue = ContinueOperation
}

Version 6.0

Siebel Object Interfaces Reference

3-77

Interfaces Reference
Application Methods

NewPropertySet

The NewPropertySet method constructs a new property set object.


Application.NewPropertySet()

Syntax

Parameter

Description

Not applicable

Returns

A property set

Usage

NewPropertySet is used primarily to construct input and output arguments for


business services.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

For an example, see SetProperty on page 3-198.

3-78

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

PositionId

The PositionId property returns the position ID (ROW_ID from S_POSTN) of the
users current position. This is set by default when the Siebel application is started
and may be changed (via Edit Change Position) if the user belongs to more than
one position.

Syntax

Application.PositionId
Argument

Description

Not applicable

Returns

A string row ID.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*
* Implemented as an attribute.

Version 6.0

Siebel Object Interfaces Reference

3-79

Interfaces Reference
Application Methods

PositionName

The PositionName property returns the position name of the users current position.
This is set by default when the Siebel application is started and may be changed
(via Edit Change Position) if the user belongs to more than one position.

Application.PositionName

Syntax

Argument

Description

Not applicable

Returns

A string containing the users position.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*
* Implemented as an attribute.

3-80

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

Example

This Siebel VB example checks for the position of a user changing the sales stage,
and prevents changes if the user is not of the appropriate position to do so.
Function BusComp_PreSetFieldValue (FieldName As String, FieldValue
As String) As Integer
Dim sPosName As String sMsgText As String
Dim iReturn As Integer
iReturn = ContinueOperation
Select Case FieldName
Case "Sales Stage"
If FieldValue = "Approved" Then
' Do not allow the sales cycle to be changed to
' this value if the User is not a manager or VP.
sPosName = TheApplication.PositionName
If ((PosName like "*Manager*") or (PosName like "*VP*"))Then
MsgBox("Pipeline Item Approved")
Else
sMsgText = "Only a Manager or Vice President can approve _
a Pipeline Item. Please notify your Manager that you _
want to have this Pipeline item approved."
MsgBox sMsgText
iReturn = CancelOperation
End If
BusComp_PreSetFieldValue = iReturn
End Select
End Function

Version 6.0

Siebel Object Interfaces Reference

3-81

Interfaces Reference
Application Methods

SetSharedGlobal

The SetSharedGlobal property sets a shared user-defined global variable, which


may be accessed using GetSharedGlobal.
Application.SetSharedGlobal(varName, value)

Syntax

Argument

Description

varName

String variable or literal containing the name of the shared global variable to
set

value

String variable or literal containing the value to set the variable to set

Returns

Not applicable

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, CORBA
Object Manager*

Example

In Siebel VB:
theApplication.SetSharedGlobal "myVar", "FOO"
myVar2 = theApplication.GetSharedGlobal("myVar")

In COM:
comVar = SiebelApplication.GetSharedGlobal("myVar", errCode)
SiebelApplication.SetSharedGlobal "myVar", "BLAH", errCode

See Also

GetLastErrCode on page 3-58


* Implemented as an attribute.

3-82

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

SetProfileAttr

SetProfileAttr is used in personalization to assign values to attributes in a user


profile.
Syntax

SetProfileAttr name, value


Parameter

Description

name

A string indicating the name of the attribute

value

The value of name

Returns

Not applicable

Usage

SetProfileAttr assigns the value value to the attribute in a user profile indicated by
name.

Used With

Siebel VB, Siebel eScript

See Also

GetProfileAttr on page 3-60

Example

This Siebel eScript example checks if the Profile Attribute Hobby has been set. If it
has not been set, it asks the user and sets the Profile Attribute to the input value.
For an equivalent Siebel VB example, see GetProfileAttr on page 3-60.
function Button1_Click ()
{
var Hobby = TheApplication.GetProfileAttr("Hobby");
if( Hobby == "")
{
Hobby = TheApplication().InputBox(
"Please enter your favorite hobby");
TheApplication().SetProfileAttr("Hobby", Hobby);
}
}

Version 6.0

Siebel Object Interfaces Reference

3-83

Interfaces Reference
Application Methods

ShowStatus

ShowStatus displays a message string in the status bar at the bottom of the window.
Application.ShowStatus(message)

Syntax

Argument

Description

message

String variable or literal containing the text to display in the status bar

Returns

Not applicable

Usage

This method is useful for errors that do not require a pop-up dialog box, and for
context messages during navigation. If the message is omitted or empty, the status
display is cleared.
NOTE: The status bar is a shared area, and the application itself may overwrite your

message in response to actions taken by the user.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a COM Automation Server example:


Private Sub ShowStatus_Click()
Dim errCode As Integer
SiebelApplication.ShowStatus StatusText.Text, errCode
Status.Text = SiebelApplication.GetLastErrText
End Sub

3-84

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

Trace

The Trace method appends a message to the trace file. Trace is useful for debugging
SQL query execution.
Syntax

Application.Trace(message)
Argument

Description

message

String variable or literal containing message text to append to the trace file

Returns

Not applicable

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, Siebel ActiveX
Application Control, Siebel ActiveX Data Control, CORBA Object Manager

Example

Here is a COM server example:


Private Sub TraceOn_Click()
Dim ErrCode As Integer
SiebelApplication.TraceOn "c:\temp\trace.txt", "allocation",
"all", ErrCode
If (ErrCode = 0) Then SiebelApplication.TraceOn
"c:\temp\trace.txt","SQL", "",ErrCode
If (ErrCode = 0) Then SiebelApplication.Trace
"Start of Tracing!",
ErrCode
End Sub

Here is a Siebel VB example:


Sub Button2_Click
theApplication.TraceOn "C:\temp\trace.txt", "allocation",
"all"
theApplication.TraceOn "C:\temp\trace.txt", "sql", ""
theApplication.Trace "start of tracing!"
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-85

Interfaces Reference
Application Methods

Sample output of an Allocation trace section:


03/05/98,17:27:47,START,4.0.4 [1425_P3] ENU
03/05/98,17:27:47,ALLOC,1,BusObject,Account,Basic
03/05/98,17:27:48,ALLOC,2,BusComp,Account,Basic
03/05/98,17:27:48,RELEASE,1
03/05/98,17:27:48,RELEASE,2

Sample output of a SQL trace section:


01/22/98,21:03:49,START,4.0.2 [1416] ENU
01/22/98,21:04:02,COMMENT,Start of Tracing!
01/22/98,21:04:10,SQLSTMT,1,SELECT,"SELECT
T1.ROW_ID,
T1.MODIFICATION_NUM,
T1.CREATED_BY,
T1.LAST_UPD_BY,
T1.CREATED,
T1.LAST_UPD,
T1.CONFLICT_ID,
T1.NAME,
T1.DESC_TEXT,
T1.PRIV_FLG,
T1.QUERY_STRING
FROM
DEV32.S_APP_QUERY T1
WHERE
(T1.CREATED_BY = :1 OR T1.PRIV_FLG = :2) AND
((T1.NAME LIKE :3 OR T1.NAME LIKE :4 OR T1.NAME LIKE :5 OR
T1.NAME LIKE :6) AND UPPER(T1.NAME) = UPPER(:7))
ORDER BY
T1.NAME, T1.DESC_TEXT"
01/22/98,21:04:10,SQLBIND,1,1,1-6NF
01/22/98,21:04:10,SQLBIND,1,2,N
01/22/98,21:04:10,SQLBIND,1,3,ac%
01/22/98,21:04:10,SQLBIND,1,4,Ac%
01/22/98,21:04:10,SQLBIND,1,5,aC%
01/22/98,21:04:10,SQLBIND,1,6,AC%
01/22/98,21:04:10,SQLBIND,1,7,Account

See Also

3-86

TraceOff on page 3-87, TraceOn on page 3-88

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

TraceOff

TraceOff turns off the tracing started by the TraceOn method.


Syntax

Application.TraceOff
Argument

Description

Not applicable

Returns

Not applicable

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, CORBA Object
Manager

Example

This Siebel VB example set the value in the Sales Stage field to the default, that is,
to the first value in the fields picklist, and uses tracing to track the result.
Sub BusComp_NewRecord
TheApplication.TraceOn "C:\lvpick.doc", "SQL", ""
Dim oBC as BusComp
set oBC = me.GetPickListBusComp("Sales Stage")
With oBC
.SetViewMode AllView
.ClearToQuery
.ActivateField "Sales Stage Order"
.SetSortSpec "Sales Stage Order"
.ExecuteQuery ForwardOnly
if .FirstRecord then
.Pick
end if
End With
set oBC = Nothing
TheApplication.TraceOff
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-87

Interfaces Reference
Application Methods

TraceOn

TraceOn turns on the tracking of allocations and deallocations of Siebel objects,


and SQL statements generated by the Siebel application.
Application.TraceOn(filename, type, selection)

Syntax

Argument

Description

filename

Output filename for the trace messages.

type

Specifies the type of tracing to start. This can have the following values:

 Allocation. Traces all allocations and deallocations of Siebel objects. This


option is useful if you suspect memory leaks in your code.

 SQL. Traces all SQL statements generated by the Siebel application.


selection

Indicates which Siebel objects should be traced for the Allocation trace type.
This argument should be "" if the trace type is SQL.

 Script. Traces VB and eScript objects.


 OLE. Traces allocations for data server or automation server programs.
 All. Traces all objects.
 CORBA. Traces allocation for CORBA object manager programs.

Returns

Not applicable

Usage

Always remember to issue TraceOff to turn off tracing. If you attempt to call TraceOn
with a different filename without calling TraceOff first, all trace information will be
written to the new trace filename. You can issue multiple TraceOn statements to the
same trace file.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, CORBA Object
Manager

3-88

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Methods

Example

Sample code for COM server:


Private Sub TraceOn_Click()
Dim ErrCode As Integer
SiebelApplication.TraceOn "c:\temp\trace.txt", "allocation",
"all", ErrCode
If (ErrCode = 0) Then SiebelApplication.TraceOn
"c:\temp\trace.txt","SQL", "",ErrCode
If (ErrCode = 0) Then SiebelApplication.Trace
"Start of Tracing!",
ErrCode
End Sub

Sample code for Siebel VB:


Sub Button2_Click
theApplication.TraceOn "C:\temp\trace.txt", "allocation",
"all"
theApplication.TraceOn "C:\temp\trace.txt", "sql", ""
theApplication.Trace "start of tracing!"
End Sub

Sample output of an Allocation trace section:


03/05/98,17:27:47,START,4.0.4 [1425_P3] ENU
03/05/98,17:27:47,ALLOC,1,BusObject,Account,Basic
03/05/98,17:27:48,ALLOC,2,BusComp,Account,Basic
03/05/98,17:27:48,RELEASE,1
03/05/98,17:27:48,RELEASE,2

Version 6.0

Siebel Object Interfaces Reference

3-89

Interfaces Reference
Application Methods

Sample output of a SQL trace section:


01/22/98,21:03:49,START,4.0.2 [1416] ENU
01/22/98,21:04:02,COMMENT,Start of Tracing!
01/22/98,21:04:10,SQLSTMT,1,SELECT,"SELECT
T1.ROW_ID,
T1.MODIFICATION_NUM,
T1.CREATED_BY,
T1.LAST_UPD_BY,
T1.CREATED,
T1.LAST_UPD,
T1.CONFLICT_ID,
T1.NAME,
T1.DESC_TEXT,
T1.PRIV_FLG,
T1.QUERY_STRING
FROM
DEV32.S_APP_QUERY T1
WHERE
(T1.CREATED_BY = :1 OR T1.PRIV_FLG = :2) AND
((T1.NAME LIKE :3 OR T1.NAME LIKE :4 OR T1.NAME LIKE :5 OR
T1.NAME LIKE :6) AND UPPER(T1.NAME) = UPPER(:7))
ORDER BY T1.NAME, T1.DESC_TEXT"
01/22/98,21:04:10,SQLBIND,1,1,1-6NF
01/22/98,21:04:10,SQLBIND,1,2,N
01/22/98,21:04:10,SQLBIND,1,3,ac%
01/22/98,21:04:10,SQLBIND,1,4,Ac%
01/22/98,21:04:10,SQLBIND,1,5,aC%
01/22/98,21:04:10,SQLBIND,1,6,AC%
01/22/98,21:04:10,SQLBIND,1,7,Account

See Also

3-90

Trace on page 3-85, TraceOff on page 3-87

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Events

Application Events

Application_Close

The Close event is called before the application exits. This allows Basic scripts to
perform last-minute cleanup (such as cleaning up a connection to a COM server).
It is called when the application is notified by Windows that it should close, but not
if the process is terminated directly.
Syntax

Application_Close
Argument

Description

Not applicable

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-91

Interfaces Reference
Application Events

Application_InvokeMethod

The Application_InvokeMethod event is called after a specialized method


is invoked.
Application_InvokeMethod(methodName)

Syntax

Argument

Description

methodName

Name of the method invoked

The InvokeMethod event is called just after a specialized method is invoked on the
application.

Usage

If you are implementing a new method (not defined by the built-in functions), the
script should return CancelOperation to avoid invoking an Unknown Method
Name error.
Returns

Not applicable

Used With

Siebel VB, Siebel eScript

See Also

How Your Script Affects Program Flow on page 2-76 and


Application_PreInvokeMethod on page 3-94

3-92

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Events

Application_PreClose

The PreClose event is called when the user exits the application.
Syntax

Application_PreClose
Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

This event is not called if the window is closed programmatically.


CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Version 6.0

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

3-93

Interfaces Reference
Application Events

Application_PreInvokeMethod

The PreInvokeMethod event is called before a specialized method is invoked by a


user-defined applet menu or by calling InvokeMethod on the application.
Application_PreInvokeMethod(methodName)

Syntax

Argument

Description

methodName

String variable or literal containing the name of the method invoked

Returns

CancelOperation or ContinueOperation

Usage

The PreInvokeMethod event is called just before a specialized method is invoked on


the application. If implementing a user-defined method, the script should return
CancelOperation if you wish to handle the event entirely through your own
scripting.
Specialized methods are methods based on applet or business component classes
other than CSSFrame and CSSBusComp, respectively, that is, specialized classes.
When the method to be invoked is part of an If statement, this functions return
value must be assigned before the End If statement, as in the following code
fragment:
If MethodName = ResetQuery then
TheApplication.MsgBox The Query has been reset
Application_PreInvokeMethod = CancelOperation
End If

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.
Used With

3-94

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Events

Example

Here is a sample implementation of the PreInvokeMethod:


Function Application_PreInvokeMethod (MethodName _
As String) As Integer
Dim i As Integer
Dim iReturn As Integer
iReturn = ContinueOperation
Select Case MethodName
Case "LaunchWord"
i = Shell("C:\Program Files\Microsoft Office _
\Office\WINWORD.EXE",1)
iReturn = CancelOperation
Case "LaunchExcel"
i = Shell("C:\Program Files\Microsoft Office _
\Office\EXCEL.EXE",1)
iReturn = CancelOperation
End Select
Application_PreInvokeMethod = iReturn
End Function

Here is the equivalent sample in Siebel eScript. Note that for this script to run, the
entire Clib.system statement must appear on a single line in the Editor.
function Application_PreInvokeMethod (MethodName)
var iReturn = ContinueOperation;
switch (MethodName)
{
case "LaunchWord":
Clib.system(""C:\\Program Files\\Microsoft Office
\\Office\\WINWORD.EXE,"" 1");
iReturn = CancelOperation;
break;
case "LaunchExcel":
Clib.system("C:\\Program Files\\Microsoft Office
\\Office\\EXCEL.EXE",1)
iReturn = CancelOperation;
}
return (iReturn)
}

See Also
Version 6.0

How Your Script Affects Program Flow on page 2-76


Siebel Object Interfaces Reference

3-95

Interfaces Reference
Application Events

Application_Start

The Start event is called when the client starts and the user interface is first
displayed.
Application_Start(commandline)

Syntax

Argument

Description

commandline

Text of the command line with which the Siebel application was started

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

3-96

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Application Events

Example

This Siebel VB code should be placed in the Application_Start procedure for the
application of your choice. This example displays the first and last name of the user
logging into the Siebel application in a message box.
Sub Application_Start(CommandLine As String)
Dim oEmpBusComp as BusComp
Dim sLoginName as String
Dim sUserName as String
sLoginName = TheApplication.LoginName
Set oEmpBusComp = oEmpBusObj.GetBusComp("Employee")
With oEmpBusComp
.ActivateField("Login Name")
.ActivateField("First Name")
.ActivateField("Last Name")
.ClearToQuery
.SetSearchSpec "Login Name", sLoginName
.ExecuteQuery
If .FirstRecord Then
sUserName = .GetFieldValue("First Name")
sUserName = sUserName + " " + _
.GetFieldValue("Last Name")
TheApplication.MsgBox "Hi there, " + SUserName + "!"
Else
MsgBox("Record not found")
End If
End With
Set oEmpBusComp = Nothing
Set oEmpBusObj = Nothing
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-97

Interfaces Reference
Business Component Methods

Business Component Methods

In the methods described in this section, the placeholder oBusComp refers to a


BusComp variable.

ActivateField

ActivateField allows queries to retrieve data for the argument-specified field.


BusComp.ActivateField(FieldName)

Syntax

Argument

Description

FieldName

String variable or literal containing the name of the field to activate

Returns

Not applicable

Usage

FieldName must be enclosed in double quotes and must be spelled exactly as the
field name appears in Siebel Tools, using the same case. You must activate fields
using ActivateField prior to executing a query for the business component.
By default, all fields are inactive except when:

 They are displayed on the applet and the business component is the instance on
which the applet is based

 They are System fields (which include Id, Created, Created By, Updated, and
Updated By)

 Their ForceActive property is set to TRUE


 The method ActivateField has been invoked with the FieldName
 They have the Link Specification property set to TRUE
After a business component has been executed, if additional fields are activated, the
business component must be executed again before field values can be accessed.
Failure to execute the business component will cause the application to crash.

3-98

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example. For an equivalent Siebel eScript example, see


ClearToQuery on page 3-104.
Dim oEmpBusComp As BusComp
Dim sLoginName As String
Set oEmpBusObj = TheApplication.ActiveBusObject
Set oEmpBusComp = TheApplication.ActiveBusComp
oEmpBusComp.ActivateField("Login Name")
oEmpBusComp.SetViewMode AllView
oEmpBusComp.ClearToQuery
oEmpBusComp.SetSearchSpec "Login Name", sLoginName
oEmpBusComp.ExecuteQuery
Set oEmpBusComp = Nothing

See Also

Version 6.0

DeactivateFields on page 3-105

Siebel Object Interfaces Reference

3-99

Interfaces Reference
Business Component Methods

AllowNotification

The AllowNotification method enables update of the user interface when there are
changes to the business component. User interface updates are enabled until a
matching call to SuppressNotification.
BusComp.AllowNotification

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

Calls to SuppressNotification/AllowNotification are nested; there must be as many


calls to AllowNotification as there were to SuppressNotification before user
interface update will actually occur.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control,
ActiveX Data Control, Java Data Bean

See Also

SuppressNotification on page 3-159

3-100

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Associate

The Associate method creates a new many-to-many relationship for the parent
object through an association business component (see GetAssocBusComp).
Syntax

BusComp.Associate(whereIndicator)
Argument

Description

whereIndicator

This argument should be one of the following predefined constants or the


corresponding integer: NewBefore (0) or NewAfter (1), as in NewRecord.

Returns

Not applicable

Usage

To set field values on a child record that has been associated to a parent record,
use the context of the MVGBusComp.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

NewRecord on page 3-134, GetAssocBusComp on page 3-113, GetMVGBusComp on


page 3-121

Version 6.0

Siebel Object Interfaces Reference

3-101

Interfaces Reference
Business Component Methods

Example

The following VB example adds the position CEO to the current record of the parent
business component, and updates the Opportunity Assignment Type field. The
parent business component can be any business component that includes the Sales
Rep multi-value group.
Dim oParentBC as BusComp
Dim oMvgBC as BusComp
Dim oAssocBC as BusComp
Set oParentBC = me.BusComp
Set oMvgBC = OpBC.GetMVGBusComp("Sales Rep")
Set oAssocBC = oMvgBC.GetAssocBusComp
With oAssocBC
.SetSearchSpec "Id", newPosId
.ExecuteQuery
.Associate NewAfter
End With
oMvgBC.SetFieldValue "Opportunity Assignment Type", NewType
Set oAssocBC = Nothing
Set oMvgBC = Nothing
Set oParentBC = Nothing

Here is the equivalent example in Siebel eScript.


var oParentBC = this.BusComp();
var oMvgBC = oParentBC.GetMVGBusComp("Sales Rep");
var oAssocBC = oMvgBC.GetAssocBusComp();
with (oAssocBC)
{
SetSearchSpec("Id", newPosId);
ExecuteQuery();
Associate(NewAfter);
}
oMvgBC.SetFieldValue("Opportunity Assignment Type", NewType);
oAssocBC = null;
oMvgBC = null;
oParentBC = null;

3-102

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

BusObject

The BusObject method returns the business object that contains the business
component.
Syntax

BusComp.BusObject
Argument

Description

Not applicable

Returns

The business object that contains the business component.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

Example

For an example, see GetViewMode on page 3-129 .

See Also

ActiveBusComp on page 3-49, ActiveBusObject on page 3-50


* Implemented as an attribute.

Version 6.0

Siebel Object Interfaces Reference

3-103

Interfaces Reference
Business Component Methods

ClearToQuery

The ClearToQuery method clears the current query and sort specifications on
the BusComp.
BusComp.ClearToQuery

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

Any fields to be queried must be activated before ClearToQuery. See ActivateField


on page 3-98 for details.
Search and sort specifications sent to the business component are cumulative;
the business component retains and logically ANDs all query qualifications since
the last ClearToQuery, except for new search specifications on a field for which a
search specification has previously been set. In that circumstance, the new
specification replaces the old.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel eScript example. For Siebel VB examples, see


Applet_PreInvokeMethod on page 3-46, ActivateField on page 3-98, and
ExecuteQuery on page 3-107. For another eScript example, see GotoView on
page 3-64.
var oEmpBusComp TheApplication.ActiveBusObject;
var oEmpBusObj = TheApplication.ActiveBusComp;
var sLoginName;
oEmpBusComp.ActivateField("Login Name");
oEmpBusComp.ClearToQuery();
oEmpBusComp.SetSearchSpec("Login Name", sLoginName);
oEmpBusComp.ExecuteQuery();
oEmpBusComp = null;
oEmpBusObj = null;

See Also
3-104

RefineQuery on page 3-142


Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

DeactivateFields

DeactivateFields deactivates all the fields that are currently active from a business
component SQL query statement.
Syntax

BusComp.DeactivateFields
Argument

Description

Not applicable

Returns

Not applicable

Usage

You must activate fields using ActivateField prior to executing a query for the
business component.
By default, all fields are inactive except when:

 They are displayed on the applet and the business component is the instance on
which the applet is based

 They are System fields (which include Id, Created, Created By, Updated, and
Updated By)

 Their ForceActive property is set to TRUE


 The method ActivateField has been invoked with the FieldName
 They have the Link Specification property set to TRUE
After fields have been deactivated, the business component must be re-executed or
the application will crash.
Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

ActivateField on page 3-98

Version 6.0

Siebel Object Interfaces Reference

3-105

Interfaces Reference
Business Component Methods

DeleteRecord

DeleteRecord removes the current record from the business component.


BusComp.DeleteRecord

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

This Siebel VB example illustrates how to delete all accounts with a status
of "Inactive".
Sub DeleteInactiveAccounts()
Dim objBO as BusObject
Dim objBC as BusComp
Set objBO = theApplication.GetBusObject("Account")
Set objBC = objBO.GetBusComp("Account")
With objBC
.ClearToQuery
.SetSearchSpec "Status", "Inactive"
.ExecuteQuery ForwardBackward
Do While .FirstRecord
.DeleteRecord
Loop
End With
Set objBC = Nothing
Set objBO = Nothing
End Sub

3-106

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

ExecuteQuery

ExecuteQuery returns a set of BusComp records using the criteria established with
methods such as SetSearchSpec.
Syntax

BusComp.ExecuteQuery [(cursorMode as Boolean)]


Argument

Description

cursorMode

An integer in Siebel VB; a Boolean in Siebel eScript, COM, and ActiveX. An


optional parameter that must be one of the following constants (provided in
Siebel VB as well as COM Servers):

 ForwardBackward. Selected Records can be processed from first to last


or from last to first. This is the default if no value is specified.

 ForwardOnly. Selected Records can be processed only from the first


Record to the last Record. Focus cannot return to a Record.

Returns

Not applicable

Usage

Use a cursorMode of ForwardOnly wherever possible to achieve maximum


performance. If you use ForwardOnly, ensure that your application code will not
attempt to navigate backward using PreviousRecord or FirstRecord without a
requery. Do not use ForwardOnly when operating on UI business components
unless the application code re-queries using a cursorMode of ForwardBackward.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Version 6.0

Siebel Object Interfaces Reference

3-107

Interfaces Reference
Business Component Methods

Example

This Siebel VB example sets up and executes a query to find the primary on the
account team. Only the primary can change the primary address. For other
examples, see Applet_PreInvokeMethod on page 3-46, GotoView on page 3-64, and
ClearToQuery on page 3-104.
(general) (declarations)
Option Explicit
Function BusComp_PreSetFieldValue (FieldName As String,
FieldValue As String) As Integer
Dim iReturn As Integer, i As Integer
Dim iFoundP As Integer ' 1 = found (TRUE), 0 = not found (FALSE)
Dim oMVGBC as BusComp
iReturn = ContinueOperation
iFoundP = FALSE
Select Case FieldName
Case "SSA Primary Field"
set oMVGBC = me.ParentBusComp.GetMVGBusComp("Sales Rep")
With oMVGBC ' this is the position BC
.ClearToQuery
.ActivateField "Active Login Name"
.ExecuteQuery ForwardBackward
i = .FirstRecord
Do While i <> 0
if .GetFieldValue("SSA Primary Field") = "Y" then
iFoundP = TRUE 'mark that found a primary
if.GetFieldValue("Active Login Name") <> _
TheApplication.LoginName then
MsgBox("You cannot change the Primary address " & _
"since you are not the Primary on the Account Team")
iReturn = CancelOperation
end if
Exit Do
else
i = .NextRecord
end if
Loop
if iFoundP = FALSE then
.FirstRecord
MsgBox("No Primary Found - Contact an Administrator")
end if
End With
End Select

3-108

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

set oMVGBC = Nothing


BusComp_PreSetFieldValue = iReturn
End Function

This CORBA example looks up a customer name.


int customer::lookUp(char* fName, char* lName, SiebelApplication*
pSeblApp)
{
SiebelBusObject* pBusObj;
SiebelBusComp_ptr pBusComp;
pBusObj = pSeblApp->GetBusObject("Contact");
pBusComp = pBusObj->GetBusComp("Contact");
//Activate fields necessary for customer look-up
pBusComp->ActivateField("First Name");
pBusComp->ActivateField("Last Name");
//Prepare BusComp for query, clear existing SearchSpecs
pBusComp->ClearToQuery();
//Apply current SearchSpec
pBusComp->SetSearchSpec("Last Name", lName);
pBusComp->SetSearchSpec("First Name", fName);
//Execute SearchSpec
pBusComp->ExecuteQuery(0);
//If the contact is found, return a 1.

Otherwise return a 0.

if (pBusComp->FirstRecord())
{
id = pBusComp->GetFieldValue("Id");
return 1;
}
else
{
return 0;
}
}

See Also

Version 6.0

ClearToQuery on page 3-104 and SetSearchSpec on page 3-150

Siebel Object Interfaces Reference

3-109

Interfaces Reference
Business Component Methods

ExecuteQuery2

ExecuteQuery2 returns a set of BusComp records using the criteria established with
methods such as SetSearchSpec.
BusComp.ExecuteQuery2 (cursorMode, ignoreMaxCursorSize)

Syntax

Argument

Description

cursorMode

An integer in Siebel VB; a Boolean in Siebel eScript, COM, and


ActiveX. An optional parameter that can be one of the following
two constants (provided in Siebel VB as well as COM Servers):

 ForwardBackward. Selected Records may be processed from


first to last or from last to first. This is the default if no value is
specified.

 ForwardOnly. Selected Records can be processed only from the


first Record to the last Record. Focus cannot return to a Record.
ignoreMaxCursorSize

 TRUE. Retrieves all rows from a business component.


This option may result in lower performance.

 FALSE. Retrieves the number of rows specified by the


MaxCursorSize parameter in the .cfg file.

Returns

Not applicable

Usage

ExecuteQuery2 is specific to Microsoft SQL Server.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

3-110

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

FirstRecord

FirstRecord moves the record pointer to the first record in a business component,
making that record current and invoking any associated script events.
Syntax

BusComp.FirstRecord
Argument

Description

Not applicable

Returns

An integer in Siebel VB: 1 or non-zero if there was a first record (the query returned
results) and 0 if there are no records; a Boolean in Siebel eScript, COM, ActiveX,
and CORBA.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example. For the equivalent eScript example, see NextRecord on
page 3-136.
Function BusComp_PreQuery () As Integer
Dim I As Integer
Dim isRecord As Integer
I = 0
With me
.ClearToQuery
.SetSearchSpec "Name", "*"
.ExecuteQuery ForwardBackward
isRecord = .FirstRecord
Do While isRecord
I = I + 1
isRecord = .NextRecord
Loop
End With
MsgBox I & " records."
BusComp_PreQuery = ContinueOperation
End Function

See Also

Version 6.0

NextRecord on page 3-136

Siebel Object Interfaces Reference

3-111

Interfaces Reference
Business Component Methods

FirstSelected

FirstSelected moves the focus to the first record of the multiple selection in the
business component, invoking any associated Basic events.
BusComp.FirstSelected

Syntax

Argument

Description

Not applicable

Returns

An integer in Siebel VB: 1 or non-zero if there was a first record (the query returned
results) and 0 if there are no records; a Boolean in Siebel eScript, COM, ActiveX,
and CORBA.

Used With

Siebel VB, Siebel eScript, COM Automation Server

Example

This Siebel VB example calls the email client upon the click of a button. It uses a
function, Email, that is not shown.
Sub Button1_Click
Dim oAccounts as BusComp
Dim oCurrAcct As BusComp, sName as String
Dim sSendList As String, sDescription as String
'Get the current business object
Set oCurrAcct = TheApplication.ActiveBusComp
With oCurrAcct
If .FirstSelected <> 0 then
sName = .GetFieldValue("Email Address")
Set oAccounts = oCurrAcct
If .FirstSelected <> 0 then
sSendList = .GetFieldValue("Email Address")
do while .NextSelected <> 0
sDescription = .GetFieldValue("Email Address")
sSendList = sSendList + ";" + sDescription
MsgBox(SDescription)
loop
end if
end if
End With
CallEmail(sSendList)
End Sub

3-112

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

GetAssocBusComp

GetAssocBusComp returns the association business component. The association


business component can be used to operate on the association using the normal
business component mechanisms.
Syntax

BusComp.GetAssocBusComp
Argument

Description

Not applicable

Returns

The association business component for the current business component.

Usage

This method and the Associate method make sense only for many-to-many
relationships, which are based on intersection tables, for example Account and
Industry. 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. The GetAssocBusComp should
be set to Nothing after use.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Version 6.0

Siebel Object Interfaces Reference

3-113

Interfaces Reference
Business Component Methods

Example

The following Siebel VB sample code using GetAssocBusComp adds a new industry
to an account record:
Dim oAssocBC As BusComp
Set oAssocBC = oMainBc.GetMVGBusComp("Industry").GetAssocBusComp
With oAssocBC
.ActivateField "SIC Code"
.SetSearchExpr "[SIC Code] = ""5734"" "
.ExecuteQuery ForwardOnly
If .FirstRecord Then .Associate NewBefore
End With
Set oAssocBC = Nothing

Here is the equivalent Siebel eScript code.


var oAssocBC = oMainBc.GetMVGBusComp("Industry").GetAssocBusComp;
with (oAssocBC)
{
ActivateField("SIC Code");
SetSearchExpr("[SIC Code] = ""5734"" ");
ExecuteQuery(ForwardOnly)
If (FirstRecord)
Associate(NewBefore);
}
oAssocBC = null;

See Also

3-114

GetMVGBusComp on page 3-121, GetPicklistBusComp on page 3-124

Siebel Object Interfaces Reference

Version 6.0

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)
Argument

Description

FieldName

String variable or literal containing the name of the field

Returns

A string containing the field value of the field identified in FieldName, or an empty
string ("") if the field is inactive or empty.

Usage

Only fields that were active at the time of the BusComp query will contain values.
See ActivateField on page 3-98 for more details. If this method is used on fields that
are not active, or on fields that are empty, an empty string ("") will be 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 further information, see the
Siebel Object Types Reference.

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,
will not work; nor will the column head "Created By".
Used With

Version 6.0

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

3-115

Interfaces Reference
Business Component Methods

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 With
Set bcOppty = Nothing
Set boBusObj = Nothing
End 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

3-116

ActivateField on page 3-98

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

GetFormattedFieldValue

GetFormattedFieldValue returns the field value in the current local format; it returns
values in the same format as the Siebel UI.
Syntax

BusComp.GetFormattedFieldValue(FieldName)
Argument

Description

FieldName

String variable or literal containing the name of the field to obtain the value
from

Returns

A string containing the value of the requested field, in the same format as displayed
in the user interface, or an empty string ("") if the field is inactive or empty.

Usage

GetFormattedFieldValue is useful for code that will be used in multiple countries


with different formats for currency, date, and number. This method can be used
only on fields that have been activated using ActivateField.
Some special behavior is associated with particular data types.
DTYPE_PHONE. When used on fields of DTYPE_PHONE, these methods return

formatted phone numbers.


Example 1:
phone = bc.GetFieldValue("Main Phone Number")
MsgBox "The number is " + phone
Result:
The number is 8869629123
Example 2:
phone = bc.GetFormattedFieldValue("Main Phone Number")
MsgBox "The number is " + phone
Result:
The number is (886) 962-9123

Version 6.0

Siebel Object Interfaces Reference

3-117

Interfaces Reference
Business Component Methods

DTYPE_DATE. When used on fields of DTYPE_DATE, these methods are the same as
GetFieldValue/SetFieldValue, except that the result is in the format of the Regional
Setting.

GetFieldValue/SetFieldValue on date fields will return Siebel standard formats:

 Dates:
 Times:
 Date-times:

mm/dd/yyyy
hh:nn:ss
mm/dd/yyyy hh:nn:ss

If you attempt to use SetFieldValue and your Regional Setting format is different,
you will receive an error like this:
Error: The value '31-Dec-99' can not be converted to a date
time value.
This error can be avoided by using the GetFormattedFieldValue and
SetFormattedFieldValue methods.
Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

The following Siebel VB example demonstrates how to use the


GetFormattedFieldValue function and how to calculate the number of days between
two dates.
Sub Button_Click
Dim DateDiff as Integer
Dim oBC as BusComp
Set oBC= me.BusComp
x = oBC.GetFormattedFieldValue("Start Date")
y = oBC.GetFormattedFieldValue("Done")
dx = DateValue(x)
dy = DateValue(y)
DateDiff = dy - dx
MsgBox ("date difference = " & DateDiff)
End Sub

See Also

3-118

ActivateField on page 3-98, GetFieldValue on page 3-115, SetFieldValue on


page 3-143, SetFormattedFieldValue on page 3-145

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

GetLastErrCode

The GetLastErrCode method returns the most recent error code.


Syntax

BusComp.GetLastErrCode
Argument

Description

Not applicable

Returns

The last error code as a short integer. 0 indicates no error.

Usage

After execution of a method, the GetLastErrCode can be invoked to check if any


error was returned from the previous operation. The GetLastErrText method can be
invoked to retrieve the text of the error message.

Used With

ActiveX Application Control, ActiveX Data Control

See Also

GetLastErrText on page 3-120

Version 6.0

Siebel Object Interfaces Reference

3-119

Interfaces Reference
Business Component Methods

GetLastErrText

The GetLastErrText method returns the last error text message.


BusComp.GetLastErrText

Syntax

Argument

Description

Not applicable

Returns

The most recent error text message as a String.

Usage

After execution of a method, the GetLastErrCode can be invoked to check if any


error was returned from the previous operation. The GetLastErrText method can be
invoked to retrieve the text of the error message.

Used With

ActiveX Application Control, ActiveX Data Control

See Also

GetLastErrCode on page 3-119

3-120

Siebel Object Interfaces Reference

Version 6.0

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 multi-value 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

Version 6.0

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

3-121

Interfaces Reference
Business Component Methods

Example

The following sample code using GetMVGBusComp adds a new address to the
Hong Kong Flower Shop account record. For other examples, see ExecuteQuery
on page 3-107 and GetAssocBusComp on page 3-113.
Dim
Dim
Dim
Set
Set

AccntBO as BusObject
AccntBC as BusComp
AddrBC as BusComp
AccntBO = theApplication.GetBusObject("Account")
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

3-122

GetAssocBusComp on page 3-113, GetPicklistBusComp on page 3-124

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

GetNamedSearch

GetNamedSearch returns the named search specification specified by searchName.


Syntax

BusComp.GetNamedSearch(searchName)
Argument

Description

searchName

Name of the search specification that references the search string

Returns

A string containing the value specified in the search specification identified in


searchName.

Usage

The search specification uses the same syntax as that used in predefined queries.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetSearchExpr on page 3-126, GetSearchSpec on page 3-127, SetNamedSearch on


page 3-147

Version 6.0

Siebel Object Interfaces Reference

3-123

Interfaces Reference
Business Component Methods

GetPicklistBusComp

GetPicklistBusComp returns the pick business component associated with the


specified field in the current business component.
BusComp.GetPicklistBusComp(FieldName)

Syntax

Argument

Description

FieldName

Name of the field with a picklist specified; used to obtain the pick business
component

Returns

The pick business component of the current business component and


identified field.

Usage

The returned pick business component can be used to operate on the picklist. The
GetPickListBusComp should be destroyed after use by using the Nothing function.

To pick a value from a picklist in Siebel VB


1 Use GetPicklistBusComp to create an instance of the pick list business
component.
2 Navigate in the picklist business component to the record you want to pick.
3 Use Pick to pick the value.
4 Use Set objBCPickList = Nothing to explicitly destroy the picklist
business component instance.
Used With

3-124

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Example

Here is a Siebel VB example.


If Me.GetFieldValue("City") = "San Mateo" Then
Set oBCPick = Me.GetPicklistBusComp("State")
With oBCPick
.ClearToQuery
.SetSearchSpec "Value", "CA"
.ExecuteQuery ForwardOnly
If .FirstRecord Then .Pick
End With
Set oBCPick = Nothing
End If

Here is the equivalent example in Siebel eScript.


if (this.GetFieldValue("City") = "San Mateo")
{
var oBCPick = Me.GetPicklistBusComp("State")
with (oBCPick)
{
ClearToQuery();
SetSearchSpec("Value", "CA");
ExecuteQuery(ForwardOnly);
If (FirstRecord)
Pick();
}
oBCPick = null;
}

See Also

Version 6.0

GetAssocBusComp on page 3-113, GetMVGBusComp on page 3-121

Siebel Object Interfaces Reference

3-125

Interfaces Reference
Business Component Methods

GetSearchExpr

GetSearchExpr returns the current search expression for the business component.
BusComp.GetSearchExpr

Syntax

Argument

Description

Not applicable

Returns

A string containing the current search expression. An example of a returned search


expression string is "Revenue > 10000 AND Probability > .5".

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetNamedSearch on page 3-123, GetSearchSpec on page 3-127, SetSearchExpr on


page 3-148

3-126

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

GetSearchSpec

GetSearchSpec returns the search specification for the field specified by the
FieldName argument.
Syntax

BusComp.GetSearchSpec(FieldName)
Argument

Description

FieldName

Contains the name of the field from which to obtain the associated search
specification

Returns

A string containing the search specification for the field identified in FieldName. An
example of a returned search specification string is "> 10000".

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetNamedSearch on page 3-123, GetSearchExpr on page 3-126, SetSearchSpec on


page 3-150

Version 6.0

Siebel Object Interfaces Reference

3-127

Interfaces Reference
Business Component Methods

GetUserProperty

GetUserProperty returns the value of a named user property.


BusComp.GetUserProperty(propertyName)

Syntax

Argument

Description

propertyName

Contains the name of the user property to obtain

Returns

The user property.

Usage

The value of a user property is set using SetUserProperty. The user properties act
like instance variables of a business component. The advantage of user properties
is that they can be accessed from anywhere in the code (even from other
applications via COM) using GetUserProperty. An instance variable, on the other
hand, can be accessed only from within Siebel VB from the same object on which
the variable is declared.
The value of the property is reset every time you instantiate a new business
component.

Used With

Example

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, CORBA
Object Manager
Sub BusComp_SetFieldValue (FieldName As String)
Dim msgText as String
msgText = me.GetUserProperty("Pecuniary Orientation")
MsgBox value
End Sub

See Also

3-128

SetUserProperty on page 3-156

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

GetViewMode

GetViewMode returns the current visibility mode for the business component. This
affects which records are returned by queries according to the visibility rules. See
SetViewMode on page 3-157 for more information.
Syntax

BusComp.GetViewMode
Argument

Description

Not applicable

Returns

An integer constant that identifies a visibility mode.


visibility mode An integer (0-4) or SiebelViewMode constant. The constants
shown are defined in all three environments.

 SalesRepView
 ManagerView
 PersonalView
 AllView
 NoneSetView
Usage

GetViewMode() will return NoneSetView mode until a business component has


been executed or had its view mode set via SetViewMode(). The NoneSetViewMode
value indicates that the business component has not yet had any visibility rules
applied to it. A business component that has just been created via a call to
GetBusComp() will be in this state, so if a specific view mode is desired, it must be
explicitly set via SetViewMode(). Otherwise, the first time the business component
is executed, its view mode will be set according to some internal rules.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*
* Implemented as an attribute.

See Also
Version 6.0

SetViewMode on page 3-157


Siebel Object Interfaces Reference

3-129

Interfaces Reference
Business Component Methods

InvokeMethod

InvokeMethod calls the specialized method or user-created method named in the


argument.
VB Syntax

BusComp.InvokeMethod methodName, methodArgs


Argument

Description

methodName

The name of the method

methodArgs

A single string or a string array containing arguments to methodName

BusComp.InvokeMethod(methodName, methArg1, methArg2, ..., methArgn);

eScript
Syntax

Argument

Description

methodName

The name of the method

methArg1, methArg2, ..., methArgn

One or more strings containing arguments to


methodName

Returns

A string containing the method name.

Usage

InvokeMethod enables you to call methods on a business component object that are
not exposed directly through the object interface.
Specialized methods are typically methods implemented in applet or business
component classes other than CSSFrame and CSSBusComp, respectively, that is,
specialized classes.
You can use InvokeMethod to call only the following specialized methods in certain
business components: CreateFile, GetFile, PutFile. Usage of these methods is
described in Siebel Technical Note #198.

Used With

3-130

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Example

Here is a Siebel VB example.


(general) (declarations)
Option Explicit
Sub Button1_Click
InvokeMethod "Select All"
End Sub
Function BusComp_PreInvokeMethod (MethodName As String) As
Integer
BusComp_PreInvokeMethod = ContinueOperation
On Error GoTo Leave
If MethodName = "Select All" Then
Dim oCurBC as BusComp
Set oCurBC = Me.BusComp
If oCurBC is not nothing Then
oCurBC.ClearToQuery
oCurBC.ExecuteQuery
BusComp_PreInvokeMethod = CancelOperation
End If
End If
Leave:
End Function

Here is the equivalent example in Siebel eScript.


function BusComp_PreInvokeMethod (MethodName)
{
var iReturn = ContinueOperation;
If (Clib.errno() != 0)
break Leave;
if (MethodName = "Select All")
{
var oCurBC = Me.BusComp
if (oCurBC != null)
oCurBC.ClearToQuery();
oCurBC.ExecuteQuery();
iReturn = CancelOperation;
}
}
return (iReturn);
Leave:
}

Version 6.0

Siebel Object Interfaces Reference

3-131

Interfaces Reference
Business Component Methods

LastRecord

LastRecord moves to the last record in the business component.


oBusComp.LastRecord

Syntax

Argument

Description

Not applicable

Returns

An integer in Siebel VB; a Boolean in Siebel eScript, COM, ActiveX, and CORBA: 1
or non-zero if there was a last record (the query returned results) and 0 if there are
no records.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a COM Automation Server example.


Private Sub LastRecord_Click()
Dim errCode As Integer
Dim oBusComp as SiebelBusComp
FieldValue.Text = ""
HourGlassStart
oBusComp.LastRecord errCode
If errCode = 0 Then
FieldValue.Text = oBusComp.GetFieldValue(FieldName.Text, _
errCode)
End If
HourGlassStop
Status.Text = SiebelApplication.GetLastErrText
End Sub

See Also

3-132

FirstRecord on page 3-111, NextRecord on page 3-136

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Name

The Name property contains the name of the business component.


Syntax

oBusComp.Name
Argument

Description

Not applicable

Returns

A string containing the business component name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

Example

Here is a Siebel VB example:


Dim CurrOppty As BusComp
Set CurrOppty = theApplication.ActiveBusComp
MsgBox("The active business component is " & CurrOppty.Name & ".")
* Implemented as an attribute.

Version 6.0

Siebel Object Interfaces Reference

3-133

Interfaces Reference
Business Component Methods

NewRecord

NewRecord adds a new record (row) to the business component.


oBusComp.NewRecord(whereIndicator)

Syntax

Argument

Description

whereIndicator

Predefined constant or corresponding integer indicating where the new


row will be added. This value should be one of the following:

 0 (or NewBefore)
 1 (or NewAfter)
 2 (or NewBeforeCopy)
 3 (or NewAfterCopy)

Returns

Not applicable

Usage

This new row becomes the current row. The constants are provided in all available
environments.
You can use NewRecord to copy a record. To do so, use
Object.NewRecord NewBeforeCopy
to place the copy before the original record, or
Object.NewRecord NewAfterCopy
to place the copy after the original record.

Used With

3-134

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Example

Here is a Siebel VB example:


Dim oBusObj as BusObject
Dim oBC as BusComp
Set oBusObj = theApplication.ActiveBusObject
Set oBC = oBusObj.GetBusComp("Action")
oBC.NewRecord NewAfter
oBC.SetFieldValue "Type", "To Do"
oBC.SetFieldValue "Description", "Find Decision Makers")
oBC.WriteRecord
set oBC = Nothing
set oBusObj = Nothing

Version 6.0

Siebel Object Interfaces Reference

3-135

Interfaces Reference
Business Component Methods

NextRecord

NextRecord moves the record pointer to the next record in the business component,
making that the current record and invoking any associated script events.
oBusComp.NextRecord

Syntax

Argument

Description

Not applicable

Returns

An integer in Siebel VB; a Boolean in Siebel eScript, COM, and ActiveX: 1 if the
current record was moved to the next record, 0 if the current record was already the
last record.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel eScript example. For the equivalent Siebel VB example, see
FirstRecord on page 3-111.
var i = 0;
var isRecord;
with (this)
{
ClearToQuery();
SetSearchSpec("Name", "*");
ExecuteQuery(ForwardBackward);
isRecord = FirstRecord();
}
while (isRecord)
{
i++;
isRecord = BusComp.NextRecord();
}
TheApplication().MsgBox(i + " records.");

See Also

3-136

FirstRecord on page 3-111

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

NextSelected

NextSelected moves the focus to the next record of the current multiple selection.
Syntax

oBusComp.NextSelected
Argument

Description

Not applicable

Returns

An integer: 1 if there is another record in the multiple selection, 0 otherwise.

Used With

Siebel VB, Siebel eScript, COM Automation Server

Example

For examples, see InvokeMethod on page 3-68 and FirstSelected on page 3-112.

Version 6.0

Siebel Object Interfaces Reference

3-137

Interfaces Reference
Business Component Methods

ParentBusComp

ParentBusComp returns the parent (master) business component when given the
child (detail) business component of a Link.
oBusComp.ParentBusComp

Syntax

Argument

Description

Not applicable

Returns

The Parent business component of the Link.

Usage

ParentBusComp enables you to write code in the child business component that
accesses field values and performs actions on the parent business component using
the normal business component mechanisms.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a Siebel VB example. For another example, see ExecuteQuery on page 3-107.
Dim strParentName as String
...
strParentName = Me.ParentBusComp.GetFieldValue("Name")

3-138

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Pick

The Pick method places the currently selected record in a picklist business
component (see GetPicklistBusComp) into the appropriate fields of the parent
business component.
Syntax

oBusComp.Pick
Argument

Description

Not applicable

Returns

Not applicable

Usage

Pick must be invoked on the picklists business component.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Version 6.0

Siebel Object Interfaces Reference

3-139

Interfaces Reference
Business Component Methods

Example

This Siebel VB example sorts the values in the Sales Stage field.
Sub BusComp_NewRecord
Dim oBC as BusComp
set oBC = me.GetPickListBusComp("Sales Stage")
With oBC
.ClearToQuery
.ActivateField "Sales Stage Order"
.SetSortSpec "Sales Stage Order"
.ExecuteQuery ForwardOnly
if .FirstRecord then .Pick
End With
set oBC = Nothing
End Sub

Here is the same example in Siebel eScript.


function BusComp_NewRecord ()
{
var oBC = this.GetPickListBusComp("Sales Stage");
with (oBC)
ClearToQuery();
ActivateField("Sales Stage Order");
SetSortSpec("Sales Stage Order");
ExecuteQuery(ForwardOnly);
if (FirstRecord)
Pick();
}
oBC = null;
}

See Also

3-140

GetPicklistBusComp on page 3-124

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

PreviousRecord

PreviousRecord moves to the previous record in the business component, invoking


any associated Basic events.
Syntax

oBusComp.PreviousRecord
Argument

Description

Not applicable

Returns

An integer in Siebel VB; Siebel eScript, a Boolean in COM, ActiveX, and CORBA: 1
or non-zero if the current record was moved to the previous record, 0 if the current
record was already the first record.

Usage

PreviousRecord may be used only on a business component that has been queried
using the FowardBackward CursorMode.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

Here is a COM Automation Server example.


(general) (declarations)
Option Explicit
Private Sub PreviousRecord_Click()
Dim errCode As Integer
Dim oBusComp as BusComp
FieldValue.Text = ""
HourClassStart
SBusComp.PreviousRecord errCode
If errCode = 0 Then
FieldValue.Text = SBusComp.GetFieldValue(FieldName.Text, _
errCode)
End If
HourClassStop
Status.Text = SiebelApplication.GetLastErrText
End Sub

See Also

Version 6.0

ExecuteQuery on page 3-107

Siebel Object Interfaces Reference

3-141

Interfaces Reference
Business Component Methods

RefineQuery

This method refines a query after the query has been executed.
oBusComp.RefineQuery

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

Unlike ClearToQuery, RefineQuery retains the existing query specification and


allows you to add search conditions based only on those fields that have not been
set by previous search expressions. RefineQuery may be most useful when used in
conjunction with GetNamedSearch.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

The following Siebel VB code fragment shows how RefineQuery might be used:
me.ActivateField "Status"
me.SetSearchSpec "Status", "Open"
me.ClearToQuery
me.ExecuteQuery
me.RefineQuery
me.SetSearchSpec "Substatus", "Assigned"
me.ExecuteQuery

See Also

3-142

ClearToQuery on page 3-104 and GetNamedSearch on page 3-123

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

SetFieldValue

SetFieldValue assigns the new value to the named field for the current row of the
business component.
Syntax

oBusComp.SetFieldValue FieldName, FieldValue


Argument

Description

FieldName

String containing the name of the field to assign the value to

FieldValue

String containing the value to assign

Returns

Not applicable

Usage

This method can be used only on fields that are active. See ActivateField on
page 3-98 for details.
FieldName must be enclosed in double quotes, and must be spelled exactly as the
field name appears in Siebel Tools (not in the status line of the application or the
column head), with the correct case; for example,
SetFieldValue "Name", "Acme"
NOTE: When calling SetFieldValue from a COM application, to set a field to an empty
string you must use the syntax

SetFieldValue FieldName "''"


Otherwise the value in the field will not change.

Used With

Version 6.0

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

3-143

Interfaces Reference
Business Component Methods

Example

Here is a Siebel VB example.


Dim CurrOppty as BusComp
Set CurrOppty = TheApplication.ActiveBusComp
If Val(CurrOppty.GetFieldValue("Rep %")) < 75 Then
CurrOppty.SetFieldValue "Rep %", "75"
End If

Here is the same example in Siebel eScript.


var CurrOppty = TheApplication().ActiveBusComp()
if (ToInteger(CurrOppty.GetFieldValue("Rep %")) < 75)
CurrOppty.SetFieldValue("Rep %", "75");

See Also

3-144

ActivateField on page 3-98, SetFormattedFieldValue on page 3-145

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

SetFormattedFieldValue

SetFormattedFieldValue assigns the new value to the named field for the current
row of the business component. SetFormattedFieldValue accepts the field value in
the current local format.
Syntax

oBusComp.SetFormattedFieldValue FieldName, FieldValue


Argument

Description

FieldName

String containing the name of the field to assign the value to

FieldValue

String containing the value to assign

Returns

Not applicable

Usage

This method is useful when you write code for a Siebel configuration that will be
used in multiple countries with different currency, date, and number formats. This
method can be used only on fields that have been activated using ActivateField.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

This Siebel VB example is a fragment from a program designed to track the velocity
of an opportunity through its sales stages.
(general) (declarations)
Option Explicit
Dim
Dim
Dim
Dim
Dim
Dim

OpportunityBO as BusObject, StageBC as BusComp


OppStageId as String, SalesRep as String, Stage as String
StagePrev As String, StageDate as String, StageDatePrev as String
Dx as Double, Dy as Double, Diff as Double, DiffStr as String
OppID As String, OppStageId as String, StageID As String
SalesStageBO as BusObject, SalesStageBC as BusComp

Set SalesStageBO = TheApplication.GetBusObject ("Sales Cycle Def")


Set SalesStageBC = SalesStageBO.GetBusComp("Sales Cycle Def")

Version 6.0

Siebel Object Interfaces Reference

3-145

Interfaces Reference
Business Component Methods

With SalesStageBC
.SetViewMode AllView
.ClearToQuery
.SetSearchSpec "Sales Cycle Stage", StagePrev
.ExecuteQuery ForwardOnly
.FirstRecord
StageId = .GetFieldValue("Id")
End With
'Instantiate stage BC
Set StageBC = OpportunityBO.GetBusComp("Opportunity Stage")
'Check that we do not already have a record for the stage
With StageBC
.SetViewMode AllView
.ClearToQuery
.SetSearchSpec "Sales Stage Id", StageId
.ExecuteQuery ForwardOnly
'Proceed further only if we do not already have record
'opportunity sales stage
If (.FirstRecord = 0) Then
'Create a new stage record and write it out
.NewRecord 1
'Record Id for future use
OppStageId = .GetFieldValue("Id")
.SetFieldValue "Opportunity Id", OppId
.SetFieldValue "Sales Stage Id", StageId
.SetFieldValue "Sales Rep", SalesRep
.SetFormattedFieldValue "Entered Date", StageDatePrev
.SetFormattedFieldValue "Left Date", StageDate
Dx = DateValue (StageDatePrev)
Dy = DateValue (StageDate)
Diff = Dy - Dx
DiffStr = Str(Diff)
.SetFieldValue "Days In Stage", DiffStr
.WriteRecord
End If
End With

See Also

3-146

ActivateField on page 3-98, SetFieldValue on page 3-143

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

SetNamedSearch

SetNamedSearch sets a named search specification on the business component.


A named search specification is identified by the searchName argument.
Syntax

oBusComp.SetNamedSearch searchName, searchSpec


Argument

Description

searchName

String containing the name of the named search specification

searchSpec

String containing the search specification string corresponding to the name

Returns

Not applicable

Usage

A named search specification is a search criterion that is not cleared by the


ClearToQuery; for example, a predefined query or business component search
specification.
A named search specification can be modified only programmatically; it cannot
be modified through the UI. This specification is applied in conjunction with the
existing search specification. Once set, the named search specification is applied
every time ExecuteQuery is called. ClearToQuery does not clear the named search
specification. To clear it, explicitly set the searchSpec argument to "". Note that
when a new instance of the BusComp is created, the named search specification
is cleared.
The searchSpec argument assigned to SetNamedSearch is the same as that used after
the equal sign in a predefined query. The maximum length of a predefined query is
2000 characters. See SetSearchExpr on page 3-148 and SetSearchSpec on page 3-150
for details on how to set up the search specification.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetNamedSearch on page 3-123 and SetSearchSpec on page 3-150

Version 6.0

Siebel Object Interfaces Reference

3-147

Interfaces Reference
Business Component Methods

SetSearchExpr

SetSearchExpr sets an entire search expression on the business component, rather


than setting one search specification per field. Syntax is similar to that on the
Predefined Queries screen.
Syntax

oBusComp.SetSearchExpr searchSpec
Argument

Description

searchSpec

Search specification string field

Returns

Not applicable

Usage

This method should be called after ClearToQuery and before ExecuteQuery.


The maximum length of a predefined query is 2000 characters. The argument
assigned to SetSearchExpr is the same as that used after the equal sign in a
predefined query. For example, the first line following is a search specification in a
predefined query; the second is the equivalent search specification used with the
various interface methods. Note that Name is a field on the business component
and therefore must be enclosed in brackets, [ ].
'Account'.Search = "[Name] ~ LIKE ""A. C. Parker"" "
BC.SetSearchExpr

"[Name] ~ LIKE ""A. C. Parker"" "

If field values have search keywords such as NOT, AND, and OR, you must use two
pairs of double quotes around the field value. For example, if a field Sub-Status can
have the string "Not an Issue" as a field value, you must use the following syntax
in order to avoid an SQL error:
substatus = GetFieldValue("Sub-Status")
searchst = "[Value] = """ & substatus & """""
BC.SetSearchExpr searchst

3-148

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

The following syntax will generate an SQL error:


substatus = GetFieldValue("Sub-Status")
searchst = "[Value] = " & substatus
BC.SetSearchExpr searchst
Use both SetSearchExpr and SetSortSpec to build a query that includes both a
search specification and a sort specification. You cannot set a sort specification with
SetSearchExpr by itself.
Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

See Also

ClearToQuery on page 3-104, ExecuteQuery on page 3-107, SetSearchSpec on


page 3-150, SetSortSpec on page 3-154
* Implemented as the attribute SearchExpr.

Version 6.0

Siebel Object Interfaces Reference

3-149

Interfaces Reference
Business Component Methods

SetSearchSpec

SetSearchSpec sets the search specification for a particular field. This method must
be called before ExecuteQuery.
Syntax

oBusComp.SetSearchSpec FieldName, searchSpec


Argument

Description

FieldName

String containing the name of the field on which to set the search
specification

searchSpec

String containing the search specification

Returns

Not applicable

Usage

If ClearToQuery is not called before SetSearchSpec, the business component


logically ANDs the new search specification with the existing search specifications.
The maximum length of a predefined query is 2000 characters.
Using logical and comparison operators. Any search specification that can be created
in the user interface can be duplicated in Siebel VB or eScript. Both logical operators
and comparison operators may be used, provided that they are handled correctly.
Here is an example:
BC.SetSearchSpec "Status", "<> 'Closed' AND ([Owner] = LoginName
() OR [Refer To] = LoginName ()) OR ([Owner] IS NULL AND [Support
Group] = 'TS-AE')"
Using special characters. If the search specification contains any of the following

characters:
= > < ( ) , ~ " ' [
it must be enclosed in quotes. This rule applies to operators that are part of the
search expression as well as text to search for. If the search expression contains
quotes, those quotes must be doubled. For example, in the preceding line of code,
notice that the entire search specification is enclosed in double quotes, whereas
fields and values referred to within the specification each have single quotes.

3-150

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

If the search object includes a single double quote, that quote must be doubled; for
example, if you wanted to search for text containing
"We must

the search specification would take this form:


SetSearchSpec "Comments", "'""We must'"

so that the initial quote is doubled, and the string containing it is placed within
single quotes, and the entire expression, including the single quotes, is placed
within double quotes.
If the search specification includes single quotes (including apostrophes), the
expression must be placed within single quotes, apostrophes must be doubled, and
double quotes must be placed around the entire string. Thus, for example, if you
wanted to search for Phillies Cheese Steaks in the Name field, you would have
to enter the specification as follows:
SetSearchSpec "Name", "'Phillie''s Cheese Steaks'"
Searching for text in non-text fields. If the search expression queries a field of any type

other than text, or if it is an expression other than a field-level query, text must be
placed within quotes if it contains any characters other than the following:
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz _ ?
\ " ' [
As with text field search expressions, quotes must be doubled.
Retrieving all records. To retrieve all records efficiently, use ClearToQuery followed
by ExecuteQuery, without using SetSearchSpec.
Searching for a null field. To search for null fields, use the following form:
SetSearchSpec "Account", "is NULL"

If your search specification requests an empty string, for example,


SetSearchSpec "Account", ""

all records will be returned.

Version 6.0

Siebel Object Interfaces Reference

3-151

Interfaces Reference
Business Component Methods

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

For Siebel VB examples, see FirstRecord on page 3-111, SetFormattedFieldValue on


page 3-145, and BusComp_PreQuery on page 3-178. For a Siebel eScript example,
see ClearToQuery on page 3-104.

Example

This code enables you to search for a contact by name and then navigate to the
record displayed in a view.
(general) (declarations)
Option Explicit
Sub Button1_Click
Dim
Dim
Dim
Dim
Dim
Dim

theCurrComp As BusComp
TargetView As String
TargetBusObj As String
TargetBusComp As String
NewBusObj As BusObject
NewComp As BusComp

Dim RecId1 As String


Dim RecId2 As String
Dim RecId3 As String
TargetView = "Visible Contact List View"
TargetBusObj = "Contact"
TargetBusComp = "Contact"
Set theCurrComp = TheApplication.ActiveBusComp
RecId1 = theCurrComp.GetFieldValue("Last Name")
RecId2 = theCurrComp.GetFieldValue("First Name")
RecId3 = theCurrComp.GetFieldValue("Account Id")
Set NewBusObj = TheApplication.GetBusObject(TargetBusObj)
Set NewComp = NewBusObj.GetBusComp(TargetBusComp)
NewComp.ActivateField "Last Name"
NewComp.ActivateField "First Name"
NewComp.ActivateField "Account Id"

3-152

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

NewComp.SetSearchSpec "Last Name", RecId1


NewComp.SetSearchSpec "First Name", RecId2
NewComp.SetSearchSpec "Account Id", RecId3
NewComp.ExecuteQuery ForwardBackward
TheApplication.GoToView TargetView , NewBusObj
End Sub

Here is an example in Siebel eScript.


var oAccntBO = theApplication.GetBusObject("Account");
var oAccntBC = AccntBO.GetBusComp("Account");
var oAddrBC;
with (oAccntBC)
{
SetViewMode(SalesRepView);
ActivateField("Name");
ClearToQuery();
SetSearchSpec("Name", "Hong Kong Flower Shop");
ExecuteQuery()
oAddrBC = GetMVGBusComp("Street Address")
}
with (oAddrBC)
{
NewRecord(NewAfter);
SetFieldValue("City", "Denver");
WriteRecord();
}
oAddrBC = null;
oAccntBC = null;
oAccntBO = null;

See Also

Version 6.0

ExecuteQuery on page 3-107, ClearToQuery on page 3-104, SetSearchExpr on


page 3-148, SetSortSpec on page 3-154

Siebel Object Interfaces Reference

3-153

Interfaces Reference
Business Component Methods

SetSortSpec

SetSortSpec sets the sorting specification for a query.


oBusComp.SetSortSpec sortSpec

Syntax

Argument

Description

sortSpec

String containing the sort specification

Returns

Not applicable

Usage

SetSortSpec, if used, must be called after ClearToQuery and before ExecuteQuery.


The sortSpec argument is a string of the form:
"fieldName1,fieldName2,...(ASCENDING)"
or
"fieldName1,fieldName2,...(DESCENDING)"
The entire string must be placed in quotes. You can sort on various fields in different
orders by separating the field names and order specifications with commas, as in
the example.
The argument assigned to SetSortSpec is the same as that used after the equal sign
in a predefined query. For example, the first line following is a sort specification
in a predefined query; the second is the equivalent sort specification used with
the various interface methods. Note that Name is the name of a business
component field.
'Account'.Sort = "Name(ASCENDING)"
BC.SetSortSpec "Name(ASCENDING)"

Used With

3-154

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

Example

This Siebel VB example sorts the Opportunity list first by Account in reverse order,
then in alphabetical order by Site. Note that the column names in the Opportunity
list applet are not the same as those in the underlying business component.
NOTE: This example merely demonstrates how to sort in ascending and descending
order. In actual practice you should not sort in both directions in a single sort
specification, as it degrades performance considerably.

Function BusComp_PreQuery As Integer


With Me
.ActivateField("Account")
.ActivateField("Account Location")
.ClearToQuery
.SetSortSpec "Account(DESCENDING), Account Location(ASCENDING)"
.ExecuteQuery
End With
BusComp_PreQuery = ContinueOperation
End Function

Here is the same example in Siebel eScript.


Function BusComp_PreQuery
with (this)
{
ActivateField("Account");
ActivateField("Account Location");
ClearToQuery();
SetSortSpec "Account(DESCENDING), Account Location(ASCENDING)";
ExecuteQuery();
}
return (ContinueOperation);
}

See Also

Version 6.0

SetSearchExpr on page 3-148, SetSearchSpec on page 3-150

Siebel Object Interfaces Reference

3-155

Interfaces Reference
Business Component Methods

SetUserProperty

Sets the value of a named business component user property. The user properties
are similar to instance variables of a BusComp.
oBusComp.SetUserProperty propertyName, newValue

Syntax

Argument

Description

propertyName

String containing the name of the user property to set

newValue

String containing the property value

Returns

Not applicable

Usage

The advantage of user properties is that they can be accessed from anywhere in the
code (including from other applications via COM) using GetUserProperty. An
instance variable, on the other hand, can be accessed only from within Siebel VB
from the same object on which the variable is declared.
Note that the value of the property is reset every time you instantiate a new business
component.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, CORBA
Object Manager

Example

Here is a Siebel VB example.


Sub BusComp_SetFieldValue (FieldName As String)
Select Case FieldName
Case "Committed"
me.SetUserProperty "Flagged", "Y"
End Select
End Sub

Here is the same example in Siebel eScript.


function BusComp_SetFieldValue (FieldName)
{
switch (FieldName)
{
case "Committed":
this.SetUserProperty("Flagged", "Y");
}
}

3-156

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

See Also

GetUserProperty on page 3-128

SetViewMode

SetViewMode sets the visibility type for the business component.


Syntax

oBusComp.SetViewMode mode
Argument

Description

mode

An integer (03) or SiebelViewMode constant. The constants shown are


defined in all three environments.

 0 (or SalesRepView)
 1 (or ManagerView)
 2 (or PersonalView)
 3 (or AllView)

Returns

Not applicable

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

See Also

GetViewMode on page 3-129


* Implemented as the attribute ViewMode.

Version 6.0

Siebel Object Interfaces Reference

3-157

Interfaces Reference
Business Component Methods

Example

Here is a Siebel VB example. For another example, see BusComp_PreDeleteRecord


on page 3-173.
(general) (declarations)
Option Explicit
Dim oBO as BusObject
Dim oBC as BusComp
Set oBO = theApplication.GetBusObject(Me.BusObject.Name)
Set oBC = oBO.GetBusComp(Me.Name)
With oBC
.SetViewMode SalesRepView
.ClearToQuery
.ActivateField "Name"
.SetSearchSpec "Name", Me.GetFieldValue("Name")
.SetSearchSpec "Id", "<> " & Me.GetFieldValue("Id")
.ExecuteQuery ForwardOnly
If .FirstRecord Then
MsgBox "Entry for name " & Me.GetFieldValue("Name") & _
" exists already"
End If
End With
Set oBC = Nothing
Set oBO = Nothing

Here is the same example in Siebel eScript.


var oBO = TheApplication.GetBusObject(this.BusObject.Name);
var oBC = oBO.GetBusComp(this.Name);
with (oBC)
{
SetViewMode(SalesRepView);
ClearToQuery();
ActivateField("Name");
SetSearchSpec("Name", this.GetFieldValue("Name"));
SetSearchSpec("Id", "<> " + this.GetFieldValue("Id");
ExecuteQuery(ForwardOnly);
if (FirstRecord)
TheApplication().MsgBox("Entry for name " +
this.GetFieldValue("Name") + " exists already");
}
oBC = null;
oBO = null;

3-158

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

SuppressNotification

SuppressNotification disables the updates to the user interface that result from
changes to the business component.
Syntax

oBusComp.SuppressNotification
Argument

Description

Not applicable

Returns

Not applicable

Usage

Calls to SuppressNotification/AllowNotification nest and there must be as many


calls to AllowNotification as there were to SuppressNotification before user
interface updating will actually occur.
SuppressNotification is used to avoid undesired flicker in the user interface and to
improve performance for operations that primarily access data.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control,
ActiveX Data Control, Java Data Bean

See Also

AllowNotification on page 3-100

Version 6.0

Siebel Object Interfaces Reference

3-159

Interfaces Reference
Business Component Methods

UndoRecord

UndoRecord reverses any changes made to the record that are not committed. This
includes reversing uncommitted modifications to any and all fields, as well as
deleting an active record that has not yet been committed to the database.
oBusComp.UndoRecord

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

If you are using UndoRecord to delete a new record, it is useful only after
NewRecord has been called and before the new record has been committed. If you
are using UndoRecord to reverse changes made to field values, it is useful only
before the changes have been committed through a call to WriteRecord, or before
the user has stepped off the record through the user interface. UndoRecord will
reverse all uncommitted changes to a record. Therefore, if you wish to have a
fine degree of control over which changes are reversed, place the code in the
PreNewRecord, PreSetFieldValue, or PreWriteRecord event, and issue a
CancelOperation to cancel the change invoked by the particular event.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

NewRecord on page 3-134

3-160

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

WriteRecord

Commits to the database any changes made to the current record.


Syntax

oBusComp.WriteRecord
Argument

Description

Not applicable

Returns

Not applicable

Usage

After creating new records and assigning values to fields, call WriteRecord to
commit the new record to the database.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

This Siebel VB example inserts an activity if the Sales Stage field is set to 02. For
other examples, see GetMVGBusComp on page 3-121 and NewRecord on
page 3-134.
(general) (declarations)
Option Explicit
Sub BusComp_SetFieldValue (FieldName As String)
' Run this code from the Opportunities Activities view.
' Opportunity is presumed to be the parent business component.
Select Case FieldName
Case "Sales Stage"
if Me.GetFieldValue(FieldName) LIKE "02*" Then
' reference the Action business component
Dim oBCact as BusComp
Set oBCact = me.BusObject.GetBusComp("Action")
With oBCact
.NewRecord NewAfter
.SetFieldValue "Type", "Event"
.SetFieldValue "Description", "THRU SVB, Stage _
changed to 02"
.SetFieldValue "Done", Format(Now(), _
"mm/dd/yyyy hh:mm:ss")

Version 6.0

Siebel Object Interfaces Reference

3-161

Interfaces Reference
Business Component Methods

.SetFieldValue "Status", "Done"


.WriteRecord
End With
set oBCact = Nothing
end if
End Select
End Sub

This CORBA example adds a new customer record. The error-handling routines
have been omitted for clarity.
int customer::addCustomer(char* fName, char* lName, char* street,
char* city, char* state, char* zip, SiebelApplication* pSeblApp) {
SiebelBusObject* pBusObj;
SiebelBusComp_ptr pBusComp;
short err = 0;
pBusObj = pSeblApp->GetBusObject("Contact");
pBusComp = pBusObj->GetBusComp("Contact");
//Activate necessary fields for customer look-up
try
{
pBusComp->ActivateField("First Name");
pBusComp->ActivateField("Last Name");
pBusComp->ActivateField("Personal Street Address");
pBusComp->ActivateField("Personal City");
pBusComp->ActivateField("Personal State");
pBusComp->ActivateField("Personal Postal Code");
}
//Create new record
try
{
pBusComp->NewRecord(0);
}
//Set field values
try

3-162

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Methods

{
pBusComp->SetFieldValue("First Name", fName);
pBusComp->SetFieldValue("Last Name", lName);
pBusComp->SetFieldValue("Personal Street Address", street);
pBusComp->SetFieldValue("Personal City", city);
pBusComp->SetFieldValue("Personal State", state);
pBusComp->SetFieldValue("Personal Postal Code", zip);
}
//Commit record
try
{
pBusComp->WriteRecord();
}
return 1;
}

Version 6.0

Siebel Object Interfaces Reference

3-163

Interfaces Reference
Business Component Events

Business Component Events

BusComp_Associate

The Associate event is called after a record is added to a business component to


create an association.
BusComp_Associate

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

The semantics are the same as for BusComp_NewRecord.

Used With

Siebel VB, Siebel eScript

See Also

BusComp_NewRecord on page 3-170

3-164

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_ChangeRecord

The ChangeRecord event is called after a record becomes the current row in the
business component.
Syntax

BusComp_ChangeRecord
Argument

Description

Not applicable

Returns

Not applicable

Usage

Code in the ChangeRecord event handler is executed each time that the focus
changes to another record. Avoid lengthy operations in this event handler to enable
smooth scrolling in list applets.

Used With

Siebel VB, Siebel eScript

Example

This Siebel VB example uses two subprograms in the (general) (declarations)


section to set up an audit trail for service requests. The ChangeRecord event handler
is used to initialize the values from the service record so that they can be compared
with current values.
(general) (declarations)
Option Explicit
Dim OldClosedDate, OldCreated, OldOwner, OldOwnerGroup
Dim OldSeverity, OldSource, OldStatus
Declare Sub CreateAuditRecord
Declare Sub InitializeOldValues
Sub CreateAuditRecord (FieldName As String, NewValue As String,
OldValue As String, ChangedText As String)
Dim ActionBC As BusComp
Dim CurrentBO As BusObject
Dim theSRNumber
Set CurrentBO = TheApplication.GetBusObject("Service Request")
Set ActionBC = CurrentBO.GetBusComp("Action")
theSRNumber = GetFieldValue("SR Number")

Version 6.0

Siebel Object Interfaces Reference

3-165

Interfaces Reference
Business Component Events

With ActionBC
.ActivateField "Activity SR Id"
.ActivateField "Description"
.ActivateField "Private"
.ActivateField "Service request id"
.ActivateField "Type"
.NewRecord NewAfter
.SetFieldValue
.SetFieldValue
.SetFieldValue
.SetFieldValue
.WriteRecord
End With
End Sub

"Activity SR Id",
theSRNumber
"Description",
ChangedText
"Private","Y"
"Type",
"Administration"

Sub InitializeOldValues
OldClosedDate = GetFieldValue("Closed Date")
OldOwner = GetFieldValue("Owner")
OldSeverity = GetFieldValue("Severity")
If GetFieldValue("Severity") <> OldSeverity Then
NewValue = GetFieldValue("Severity")
ChangedText = "Changed Priority from " + OldSeverity + _
" to " + NewValue
CreateAuditRecord "Severity", NewValue, OldSeverity, _
ChangedText
End If
End Sub
Sub BusComp_ChangeRecord
InitializeOldValues
End Sub

3-166

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_CopyRecord

The CopyRecord event is called after a row has been copied in the business
component and that row has been made active.
Syntax

BusComp_CopyRecord
Argument

Description

Not applicable

Returns

Not applicable

Usage

BusComp_CopyRecord is called instead of BusComp_NewRecord when a new


record is created:

 Via BusComp.NewRecord NewAfterCopy|NewBeforeCopy


 Through any UI copy record mechanism (Edit
Used With

Version 6.0

 Copy Record; CTRL+B)

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

3-167

Interfaces Reference
Business Component Events

BusComp_DeleteRecord

The DeleteRecord event is called after a row is deleted. The current context is a
different row (the Fields of the just-deleted row are no longer available).
BusComp_DeleteRecord

Syntax

Argument

Description

Not applicable

Usage

When a user reads and deletes an existing record or creates and undoes a new
record, the system invokes DeleteRecord. This invocation causes any associated
scripts to be executed.

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

3-168

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_InvokeMethod

The InvokeMethod event is called when the InvokeMethod method is called on a


business component.
Syntax

BusComp_InvokeMethod(methodName)
Argument

Description

methodName

String containing the name of the method that was invoked

Returns

Not applicable

Usage

The InvokeMethod event is called when a specialized method is called on a


business component, or when the InvokeMethod method has been explicitly called
on a business component.

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-169

Interfaces Reference
Business Component Events

BusComp_NewRecord

The NewRecord event is called after a new row has been created in the business
component and that row has been made active. The event may be used to set up
default values for Fields.
BusComp_NewRecord

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Usage

BusComp_NewRecord is called when a new record is created unless the new record
was created:

 Via BusComp.NewRecord NewAfterCopy|NewBeforeCopy


 Through any UI copy record mechanism (Edit

 Copy Record; CTRL+B)

In these cases, BusComp_CopyRecord is called instead of BusComp_NewRecord.


Used With

Siebel VB, Siebel eScript

Example

See Pick on page 3-139 for an example.

3-170

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_PreAssociate

The PreAssociate event is called before a record is added to a business component


to create an association. The semantics are the same as for
BusComp_PreNewRecord.
Syntax

BusComp_PreAssociate
Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-171

Interfaces Reference
Business Component Events

BusComp_PreCopyRecord

The PreCopyRecord event is called before a new row is copied in the business
component. The event may be used to perform pre-copy validation.
BusComp_PreNewRecord

Syntax

Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Siebel VB, Siebel eScript

3-172

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_PreDeleteRecord

The PreDeleteRecord event is called before a row is deleted in the business


component. The event may be used to prevent the deletion or to perform any
actions in which you need access to the record that is to be deleted.
Syntax

BusComp_PreDeleteRecord
Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

This event is called after the user has confirmed the deletion of the record,
but before the record is deleted from the database.
CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Version 6.0

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

3-173

Interfaces Reference
Business Component Events

Example

This Siebel VB example prevents the deletion of an account that has associated
opportunities.
(general) (declarations)
Option Explicit
Function BusComp_PreDeleteRecord As Integer
Dim iReturn as integer
Dim oBC as BusComp
Dim oBO as BusObject
Dim sAcctRowId as string
iReturn = ContinueOperation
sAcctRowId = me.GetFieldValue("Id")
set oBO = TheApplication.GetBusObject("Opportunity")
set oBC = oBO.GetBusComp("Opportunity")
With oBC
.SetViewMode AllView
.ActivateField "Account Id"
.ClearToQuery
.SetSearchSpec "Account Id", sAcctRowId
.ExecuteQuery ForwardOnly
If (.FirstRecord) = 1 Then
MsgBox("Opportunities exist for the Account - _
Delete is not allowed")
iReturn = CancelOperation
End If
End With
BusComp_PreDeleteRecord = iReturn
Set oBC = Nothing
Set oBO = Nothing
End Function

3-174

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_PreGetFieldValue

The PreGetFieldValue event is called when the value of a business component field
is accessed.
Syntax

BusComp_PreGetFieldValue(FieldName, FieldValue)
Argument

Description

FieldName

String containing the name of the field accessed

FieldValue

String containing the value accessed

Returns

ContinueOperation or CancelOperation

Usage

PreGetFieldValue will be called at least once for each user interface element that
displays the BusComp field value, and it may also be called as a result of other
internal uses.
NOTE: PreGetFieldValue is called every time the user interface is updated to re-paint
fields on the screen. Therefore, a script attached to this event runs very frequently,
which may cause the system to appear to be frozen.

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.
Used With

Version 6.0

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

3-175

Interfaces Reference
Business Component Events

BusComp_PreInvokeMethod

The PreInvokeMethod event is called before a specialized method is invoked on the


business component.
BusComp_PreInvokeMethod(methodName)

Syntax

Argument

Description

methodName

String containing the name of the method invoked

Returns

ContinueOperation or CancelOperation

Usage

The PreInvokeMethod event is called just before a specialized method is invoked on


the business component. Specialized methods are methods based on applet or
business component classes other than CSSFrame and CSSBusComp, respectively,
that is, specialized classes.
CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

3-176

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_PreNewRecord

The PreNewRecord event is called before a new row is created in the business
component. The event may be used to perform pre-insert validation.
Syntax

BusComp_PreNewRecord
Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-177

Interfaces Reference
Business Component Events

BusComp_PreQuery

The PreQuery event is called before query execution.


BusComp_PreQuery

Syntax

Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

This event may be used to modify the search criteria or to restrict the execution
of certain queries.
CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Siebel VB, Siebel eScript

Example

Function BusComp_PreQuery() As Integer


Dim strPosition As String
Dim strSearchSpec As String
Dim intReturn As Integer
intReturn = ContinueOperation
strPosition = theApplication.PositionName
strSearchSpec = Me.GetSearchSpec("Owned By")
If strPosition <> "System Administrator" Then
if Len(strSearchSpec) = 0 or InStr(strSearchSpec,
strPosition) = 0 Then
Me.SetSearchSpec "Owned By", strPosition
end if
End if
BusComp_PreQuery = intReturn
End Function

3-178

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_PreSetFieldValue

The PreSetFieldValue event is called before a value is pushed down into the
business component from the user interface or through a call to SetFieldValue.
Syntax

BusComp_PreSetFieldValue(FieldName, FieldValue)
Argument

Description

FieldName

String containing the name of the changed field

FieldValue

String containing the changed value

Returns

ContinueOperation or CancelOperation

Usage

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-179

Interfaces Reference
Business Component Events

Example

This Siebel VB example uses the PreSetFieldValue event to check if a quote discount
is greater than 20 percent, and to take appropriate action if it is. For other examples
of BusComp_PreSetFieldValue, see LoginId on page 3-72, and ExecuteQuery on
page 3-107.
Function BusComp_PreSetFieldValue (FieldName As String,
FieldValue As String) As Integer
Dim value as Integer, iReturn as Integer
Dim msgtext as String
iReturn = ContinueOperation
If FieldName = "Discount" then
value = Val(FieldValue)
If value > 20 then
msgtext = "Discounts greater than 20% must be approved"
msgbox msgtext
iReturn = CancelOperation
Else
iReturn = ContinueOperation
End if
End If
BusComp_PreSetFieldValue = iReturn
End Function

Here is the equivalent example in Siebel eScript.


function BusComp_PreSetFieldValue (FieldName, FieldValue)
{
var value;
var msgtext = "Discounts greater than 20% must be approved";
var iReturn = ContinueOperation
if (FieldName = "Discount")
{
value = Val(FieldValue);
if (value > 20)
{
TheApplication().MsgBox(msgtext);
iReturn = CancelOperation;
else
iReturn = ContinueOperation;
}
}
return (iReturn)
}

3-180

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_PreWriteRecord

The PreWriteRecord event is called before a row is written out to the database. The
event may perform any final validation necessary before the actual save occurs.
Syntax

BusComp_PreWriteRecord
Argument

Description

Not applicable

Returns

ContinueOperation or CancelOperation

Usage

CancelOperation stops the execution of the underlying Siebel code associated with
the event. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

Siebel VB, Siebel eScript

Example

Function BusComp_PreWriteRecord As Integer


' This code will reset the probability before the write
' if necessary
if Me.GetFieldValue("Sales Stage") LIKE "07*" then
' Will reset the Probability to 75 if less than 75
if Val(Me.GetFieldValue("Rep %")) < 75 then
Me.SetFieldValue "Rep %", "75"
theApplication.msgbox("Probability field RESET to 75
to conform to business rule")
end If
end if
BusComp_PreWriteRecord = ContinueOperation
End Function

Version 6.0

Siebel Object Interfaces Reference

3-181

Interfaces Reference
Business Component Events

BusComp_Query

The Query event is called just after the query is complete and all the rows have been
retrieved, but before the rows are actually displayed.
BusComp_Query

Syntax

Argument

Description

Not applicable

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

3-182

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

Example

In this Siebel VB example, important information is defined using the Activity


business component with a special activity type. If the user starts an account query,
the code checks whether important information is available. If so, the information
is displayed in a message box.
Sub BusComp_Query
Dim oBusObj As BusObject, oCurrFinAct As BusComp,
Dim oActivities as BusComp, oAppl as Applet
Dim sName as String, sDescription as String
On error goto leave
set oBusObj = theApplication.ActiveBusObject
Set oCurrFinAct = theApplication.ActiveBusComp
If oCurrFinAct.FirstRecord <> 0 then
sName = oCurrFinAct.GetFieldValue("Name")
Set oActivities = oBusObj.GetBusComp("Finance _
Important Info Activity")
With oActivities
.ActivateField("Description")
.ClearToQuery
.SetSearchSpec "Account Name", sName
.SetSearchSpec "Type", "Important Info"
.ExecuteQuery ForwardOnly
If .FirstRecord <> 0 then
sDescription = .GetFieldValue("Description")
MsgBox("Important Information: " + sDescription)
do while .NextRecord <> 0
sDescription = .GetFieldValue("Description")
MsgBox("Important Information: " + sDescription)
loop
End If
End With
End If
leave:
Set oCurrFinAct = Nothing
set oBusObj = Nothing
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-183

Interfaces Reference
Business Component Events

BusComp_SetFieldValue

The SetFieldValue event is called when a value is pushed down into the business
component from the user interface or through a call to SetFieldValue.
BusComp_SetFieldValue(FieldName)

Syntax

Argument

Description

FieldName

String containing the name of the affected field

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

Example

This Siebel VB example shows how to invoke methods on an existing BusComp


when the SetFieldValue event is triggered.
Sub BusComp_SetFieldValue (FieldName As String)
Dim desc As String
Dim newDesc As String
If FieldName = "Type" Then
newDesc = [can be any valid string containing the new description]
desc = GetFieldValue("Description")
MsgBox "The previous description is " + desc
SetFieldValue "Description", newDesc
MsgBox "The new description is " + newDesc
End If
End Sub

Here is the equivalent example in Siebel eScript.


function BusComp_SetFieldValue (FieldName)
{
if (FieldName = "Type")
{
var newDesc = "Any valid string which contains " +
"the new description.";
var desc = GetFieldValue("Description");
TheApplication().MsgBox("The previous description is " +
desc);
SetFieldValue("Description", newDesc);
TheApplication().MsgBox("The new description is " + newDesc);
}
}

3-184

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Component Events

BusComp_WriteRecord

The WriteRecord event is called after a row is written out to the database.
Syntax

BusComp_WriteRecord
Argument

Description

Not applicable

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-185

Interfaces Reference
Business Object Methods

Business Object Methods

In the descriptions that follow, the term oBusObj indicates a variable containing a
BusObject.

GetBusComp

The GetBusComp method returns the specified business component.


oBusObj.GetBusComp (BusCompName)

Syntax

Argument

Description

BusCompName

String containing the desired business component in the business object

Returns

The requested business component.

Usage

BusCompName is case sensitive, and must match in case the form of the name as it
appears in Siebel Tools. If an instance of BusCompName already exists, that instance
will be returned. Siebel will instantiate and return a new instance of a business
component using BusCompName if one does not already exist.
The Nothing function should be used to destroy the instantiated business
component when it is no longer necessary.

Used With

3-186

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Object Methods

GetLastErrCode

The GetLastErrCode method returns the last error code.


Syntax

oBusObj.GetLastErrCode
Argument

Description

Not applicable

Returns

The last error code as a short integer. 0 indicates no error.

Usage

After execution of a method, the GetLastErrCode can be invoked to check if any


error was returned from the previous operation. The GetLastErrText method can be
invoked to retrieve the text of the error message.

Used With

ActiveX Application Control, ActiveX Data Control

See Also

GetLastErrText on page 3-188

Version 6.0

Siebel Object Interfaces Reference

3-187

Interfaces Reference
Business Object Methods

GetLastErrText

The GetLastErrText method returns the last error text.


oBusObj.GetLastErrText

Syntax

Argument

Description

Not applicable

Returns

A string containing the last error text message.

Usage

After execution of a method, the GetLastErrCode can be invoked to check if any


error was returned from the previous operation. The GetLastErrText method can be
invoked to retrieve the text of the error message.

Used With

ActiveX Application Control, ActiveX Data Control

See Also

GetLastErrCode on page 3-187

3-188

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Object Methods

Name

The Name method returns the name of the business object.


Syntax

oBusObj.Name
Argument

Description

Not applicable

Returns

A string containing the business object name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

Example

For an example, see the business component method Name on page 3-133.
* Implemented as an attribute.

Version 6.0

Siebel Object Interfaces Reference

3-189

Interfaces Reference
Business Service Methods

Business Service Methods

In the following descriptions, the placeholder oService refers to a variable containing


a business service.

GetFirstProperty

This method retrieves the name of the first property of a business service.
oService.GetFirstProperty()

Syntax

Parameter

Description

Not applicable

Returns

A string containing the name of the first property of the business service.

Usage

This method retrieves the name of the first property, in order of definition, of a
business service. Use GetFirstProperty and GetNextProperty to retrieve the name of
a property. You can then use the retrieved name as an argument to GetProperty to
retrieve the property value, or with SetProperty to assign property values.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

See Also

GetNextProperty on page 3-191, GetProperty on page 3-192, and SetProperty on


page 3-198

3-190

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Methods

GetNextProperty

Once the name of the first property has been retrieved, this method retrieves the
name of the next property of a business service.
Syntax

oService.GetNextProperty()
Parameter

Description

Not applicable

Returns

A string containing the name of the next property of a business service, or a null
string ("") if no more properties exist.

Usage

After retrieving the name of the first property with GetFirstProperty, the
GetNextProperty method should be used in a loop, to be terminated when a null
string ("") is returned. When property names have been retrieved, they can be used
as parameters to GetProperty in order to retrieve the property value, or with
SetProperty to assign property values.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

See Also

GetFirstProperty on page 3-211, GetProperty on page 3-192, and SetProperty on


page 3-198

Version 6.0

Siebel Object Interfaces Reference

3-191

Interfaces Reference
Business Service Methods

GetProperty

The GetProperty method returns the value of the property whose name is specified
in its argument.
oService.GetProperty(propName)

Syntax

Parameter

Description

propName

The name of the property whose value is to be returned

Returns

A string containing the value of the property indicated by propName, or an empty


string ("") if the property does not exist.

Usage

You must know the name of a property to retrieve its value. To retrieve property
names, use the GetFirstProperty and GetNextProperty methods.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

See Also

GetFirstProperty on page 3-211, GetNextProperty on page 3-191, and SetProperty on


page 3-198

3-192

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Methods

InvokeMethod

The InvokeMethod method calls a method on the business service. This can be a
documented specialized method or a user-created method.
Syntax

oService.InvokeMethod(methodName, InputArguments, OutputArguments)


Parameter

Description

methodName

A string representing the name of the method to execute

InputArguments

A property set containing the arguments required by the method

OutputArguments

A property set containing the arguments to be returned by the method


(passed by reference)

Returns

Not applicable

Usage

Built-in business services work the same way as business component invoke
methods. That is, you can call specialized methods on the service that are not
exposed directly through the object interface.
Run-time business services can hold user-defined methods, which must be
implemented in scripts written in Siebel VB or Siebel eScript. The scripts must be
written in these languages within Siebel Tools; however, they can be called through
external interfaces.
Although the InvokeMethod function does not return a value, the properties in the
OutputArguments property set may have been modified.

Used With

Version 6.0

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

3-193

Interfaces Reference
Business Service Methods

Example

This Siebel VB example invokes the Shipping Engine business service created in
Service_PreInvokeMethod on page 3-200. It gets values from the keyboard via input
boxes, passes a property set to the service, and gets return values by means of
another property set. One possible result appears in the illustration following the
code.
Sub Shipping_Click
Dim
Dim
Dim
Dim
Dim

oBS As Service
Inputs As PropertySet, Outputs As PropertySet
sShipper As String, sShipMethod As String
sWeight As String, sSize As String, sCost As String
sZone As String, DelDate As Variant

Set oBS = theApplication.GetService("Shipping Engine")


Set Inputs = theApplication.NewPropertySet()
Set Outputs = theApplication.NewPropertySet()
sShipper = InputBox("Enter shipping company", "Shipping Company")
sShipMethod = InputBox("Enter shipping method","Shipping Method")
sWeight = (InputBox("Enter shipping weight in pounds", "Weight"
With Inputs
.SetProperty "Size", sSize
.SetProperty "Shipping Company", sShipper
.SetProperty "Ship Method", sShipMethod
.SetProperty "Weight", sWeight
If sShipper = "Airline" then
sZone = InputBox("Enter destination zone", "Zone")
sSize = InputBox("Enter sum of H+W+D in inches", "Size")
.SetProperty "Zone", sZone
.SetProperty "Total Dimensions", sSize
End If
End With
oBS.InvokeMethod "CalculateShipping", Inputs, Outputs
sCost = Outputs.GetProperty("Cost")
DelDate = Outputs.GetProperty("Delivery Date")
MsgBox "Shipping via " & sShipper & " " & sShipMethod _
& ":" & Chr$(13) & "Shipping cost is " & sCost & "," _
& Chr$(13) & "Estimated delivery date is " & _
DelDate & ".", mbOKCancel, "Shipping Info"
Set oBS = Nothing
End Sub

3-194

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Methods

See Also

Service_InvokeMethod on page 3-199 and Service_PreInvokeMethod on page 3-200

Name

The Name property contains the name of the service.


Syntax

oService.Name
Argument

Description

Not applicable

Returns

A string containing the service name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager*

Example

Here is a Siebel eScript example:


var svc = TheApplication().GetService("Data Quality Manager");
TheApplication().MsgBox("The active service is " + svc.Name +
".");
* Implemented as an attribute.

Version 6.0

Siebel Object Interfaces Reference

3-195

Interfaces Reference
Business Service Methods

PropertyExists

This method returns a Boolean value indicating whether a specified property exists.
oService.PropertyExists(propName)

Syntax

Parameter

Description

propName

A string representing the name of a property of the specified service

Returns

In Siebel VB, an integer (0 for false, 1 for true); in all other interfaces, a Boolean.

Usage

Since GetProperty returns a null string ("") for all nonexistent properties, you
should use PropertyExists() in an if statement to determine whether a specific
property has been set.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

3-196

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Methods

RemoveProperty

This method removes a property from a business service.


Syntax

oService.RemoveProperty(propName)
Parameter

Description

propName

A string indicating the name of the property to be removed

Returns

Not applicable

Usage

This method removes the property propName from the business service oService. As
a result, subsequent calls to PropertyExists for that property will return FALSE.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

See Also

PropertyExists on page 3-196

Version 6.0

Siebel Object Interfaces Reference

3-197

Interfaces Reference
Business Service Methods

SetProperty

This method assigns a value to a property of a business service.


oService.SetProperty(propName, propValue)

Syntax

Parameter

Description

propName

A string indicating the name of the property whose value is to be set

propValue

A string containing the value to assign to the property indicated by propName

Returns

Not applicable

Usage

SetProperty is used to set the value of a property of the business service from one
of the methods of the service or from an external method. SetProperty may be used
to set properties in the Outputs property set.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

Example

For an example, see Service_PreInvokeMethod on page 3-200.

See Also

GetProperty on page 3-192

3-198

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Events

Business Service Events

Service_InvokeMethod

The InvokeMethod event is called after the InvokeMethod method is called on a


business service.
Syntax

Service_InvokeMethod(methodName, InputArguments, OutputArguments)


Parameter

Description

methodName

A string representing the name of the method to execute

InputArguments

A property set containing the arguments required by the method

OutputArguments

A property set containing the arguments to be returned by the method

Returns

Not applicable

Usage

Although this event does not return a value, it may add properties to, or alter the
values of the properties in, the property set OutputArguments.
The InvokeMethod event is called after a specialized or user-defined method called
by Service_PreInvokeMethod has completed.This event is generally used less often
than Service_PreInvokeMethod, because it is called after any built-in Siebel code
may have executed, whereas the PreInvokeMethod is called before the built-in code,
and may supplant it if Service_PreInvokeMethod returns CancelOperation.

Used With

Siebel VB, Siebel eScript

See Also

Service_PreInvokeMethod on page 3-200

Version 6.0

Siebel Object Interfaces Reference

3-199

Interfaces Reference
Business Service Events

Service_PreInvokeMethod

The PreInvokeMethod event is called before a specialized method on the business


service is invoked.
Syntax

Returns

3-200

Service_PreInvokeMethod(methodName, InputArguments, OutputArguments)


Parameter

Description

methodName

A string representing the name of the method to execute

InputArguments

A property set containing the arguments required by the method

OutputArguments

A property set containing the arguments to be returned by the method

CancelOperation or ContinueOperation

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Events

Usage

If implementing a new method, or overriding the behavior of a method


implemented in a specialized business service, the script should return
CancelOperation to avoid invoking an Unknown method name error. As
Figure 3-1 illustrates, this error is predictable if the PreInvokeMethod event is
scripted. This occurs because there is no native code to execute in the
InvokeMethod event. CancelOperation tells the Siebel application to cancel the
remaining operations associated with the event.

S te p 1

PreInvokeMethod
Event fires to run VB or
eScript code

CancelOperation

ContinueOperation

S te p 2

S te p 3

Figure 3-1.

Any internal Siebel


code for the event runs

Any code in the


PreInvokeMethod following
the CancelOperation
is executed

InvokeMethod
Raises an "Unknown
method name" error

No internal Siebel code


for the event runs

Stop

Stop

The Effects of CancelOperation and ContinueOperation

Service_InvokeMethod is rarely scripted, but can be used for such post-operation


events as posting a notice to a log when the event completes successfully.

Version 6.0

Siebel Object Interfaces Reference

3-201

Interfaces Reference
Business Service Events

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, CORBA Object Manager

Example

This Siebel VB example creates the new service Shipping Engine.


Function Service_PreInvokeMethod (MethodName As String, Inputs As
PropertySet, Outputs As PropertySet) As Integer
If MethodName = "CalculateShipping" Then
Dim
Dim
Dim
Dim

sShipper As String, sShipMethod As String


dWeight As Double, dSize As Double, dCost As Double
sZone As String, DelDate As Variant
sCost As String, iReturn As Integer

iReturn = ContinueOperation
sShipper = Inputs.GetProperty("Shipping Company")
sShipMethod = Inputs.GetProperty("Ship Method")
dWeight = Val(Inputs.GetProperty("Weight"))
dSize = Val(Inputs.GetProperty("Total Dimensions"))
iZone = Val(Inputs.GetProperty("Zone"))
DelDate = DateValue(Now)
Select Case sShipper
Case "GlobalEx"
Select Case sShipMethod
Case "Next-Day Air"
dCost = 14 + dWeight
DelDate = DelDate + 1
Case "Second-Day Air"
dCost = 11 + (dWeight * .54)
DelDate = DelDate + 2
End Select
Case "Airline"
Select Case sShipMethod
Case "Next-Day Air"
dCost = 5 + (dWeight * .3) + (dSize * .33) + _
(Val(sZone) * .5)
DelDate = DelDate + 1
Case "Second-Day Air"
dCost = 4 + (dWeight * .3) + (dSize * .2) + _
(Val(sZone) * .3)
DelDate = DelDate + 2

3-202

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Business Service Events

Case "Ground"
dCost = 3 + (dWeight * .18) + (dSize * .1) + _
(Val(sZone) * .1)
DelDate = DelDate + 2 + Int(Val(sZone) * .8)
End Select
End Select
sCost = Format(dCost, "Currency")
Outputs.SetProperty "Cost", sCost
Outputs.SetProperty "Delivery Date", DelDate
iReturn = CancelOperation
End If
Service_PreInvokeMethod = iReturn
End Function

See Also

Version 6.0

Service_InvokeMethod on page 3-199

Siebel Object Interfaces Reference

3-203

Interfaces Reference
Property Set Methods

Property Set Methods

In the following descriptions, the placeholder oPropSet refers to a variable


containing a property set.

AddChild

The AddChild method is used to add subsidiary property sets to a property set, in
order to form hierarchical (tree-structured) data structures.
oPropSet.AddChild(childObject)

Syntax

Parameter

Description

childObject

A property set to be made subsidiary to the property set indicated by


oPropSet

Returns

An integer indicating the index of the child property set.

Usage

Property sets can be used to create tree-structured data structures. Any number of
arbitrarily structured child property sets can be added to a property set. You may
use child property sets to structure a property set in a manner similar to the data
model. Thus, for example, the parent property set might be Account, with child
property sets for opportunities, contacts, activities, and so on. At the same time, you
could construct an independent property set called Opportunity, to which accounts,
contacts, and activities might be children.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

3-204

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

Example

The following fragment of eScript code shows how child property sets may be added
to a parent property set.
var
var
var
var

Account = TheApplication().NewPropertySet();
Opportunity = TheApplication().NewPropertySet();
Contact = TheApplication().NewPropertySet();
Activity = TheApplication().NewPropertySet();

Account.AddChild(Opportunity);
Account.AddChild(Contact);
Account.AddChild(Activity);

See Also

Version 6.0

GetChild on page 3-208, InsertChildAt on page 3-216, and RemoveChild on


page 3-218

Siebel Object Interfaces Reference

3-205

Interfaces Reference
Property Set Methods

Copy

This method returns a copy of a property set.


oPropSet.Copy()

Syntax

Parameter

Description

Not applicable

Returns

A copy of the property set indicated by oPropSet.

Usage

This method creates a copy of a property set, including any properties and children
it may have. Since property sets are generally passed by reference, making a copy
enables the method to manipulate the property set without affecting the original
definition.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

This Siebel VB uses a copy of a property set to store the original values of its
properties, and displays both the original and Pig-Latin forms of the properties, as
shown in the illustration following the example.
(general) (declarations)
Option Explicit
Function PigLatin (Name1 As String) As String
Dim Name2 As String, FirstLetter As String
Name2 = Right$(Name1, len(Name1) - 1)
FirstLetter = Left$(Name1, 1)
Name2 = UCase(Mid$(Name1, 2, 1)) & _
Right$(Name2, Len(Name2) - 1)
Name2 = Name2 & LCase(FirstLetter) & "ay"
PigLatin = Name2
End Function

3-206

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

Sub ClickMe_Click
Dim Inputs As PropertySet, Outputs As PropertySet
Dim message As String, propName, propVal, newPropVal
set Inputs = theApplication.NewPropertySet
Inputs.SetProperty "Name", "Harold"
Inputs.SetProperty "Assistant", "Kathryn"
Inputs.SetProperty "Driver", "Merton"
set Outputs = Inputs.Copy()
propName = Outputs.GetFirstProperty()
do while propName <> ""
propVal = Outputs.GetProperty(propName)
newPropVal = PigLatin(propVal)
Outputs.SetProperty propName, newPropVal
message = message & propVal & " has become " & _
newPropVal & Chr$(13)
propName = Outputs.GetNextProperty()
loop
MsgBox message, mbOKOnly, "Pig-Latin Translator"
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-207

Interfaces Reference
Property Set Methods

GetChild

GetChild returns a specified child property set of a property set.

Syntax

oPropSet.GetChild(index)
Parameter

Description

index

An integer representing the index number of the child property set to be


retrieved

Returns

The property set at index index of the parent property set.

Usage

When child property sets are created, each is given an index number within the
parent property set, starting at 0. Property sets added using AddChild get the next
available index number. However, a property set added using InsertChildAt inserts
a new property set at a specified index. The property set previously at that index,
and all property sets after it, have their indexes increased by 1. Similarly, a property
set removed using RemoveChild decreases the indexes of following child property
sets by 1.
NOTE: This method returns the number of direct descendants only. That is, if the
child property sets have children of their own, these grandchildren are not included
in the computation of the return value.

Used With

3-208

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

Example

This Siebel eScript example sets the Name property of all child property sets to the
same value.
function Test1_Click ()
{
var Account = TheApplication().NewPropertySet();
var Opportunity = TheApplication().NewPropertySet();
var Contact = TheApplication().NewPropertySet();
var Activity = TheApplication().NewPropertySet();
var j;
Account.AddChild(Opportunity);
Account.AddChild(Contact);
Account.AddChild(Activity);
for (var i = 0; i < Account.GetChildCount(); i++)
{
j = Account.GetChild(i);
j.SetProperty('Name', 'Allied Handbooks');
}
}

See Also

Version 6.0

AddChild on page 3-204, InsertChildAt on page 3-216,

Siebel Object Interfaces Reference

3-209

Interfaces Reference
Property Set Methods

GetChildCount

This method returns the number of child property sets attached to a parent property
set.
oPropSet.GetChildCount()

Syntax

Parameter

Description

Not applicable

Returns

The number of child property sets subordinate to oPropSet.

Usage

This method returns the actual number of child property sets of oPropSet. Since
index numbers for child property sets start at 0, a child count of 3 indicates that
there are child property sets at indexes 0, 1, and 2.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object
Manager*

Example

For an example, see GetChild on page 3-208.


* Implemented as an attribute.

3-210

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

GetFirstProperty

This method returns the name of the first property in a property set.
Syntax

oPropSet.GetFirstProperty()
Parameter

Description

Not applicable

Returns

A string representing the name of the first property in a property set.

Usage

GetFirstProperty() retrieves the name of the first property, in order of definition, of


a business service. Use GetFirstProperty and GetNextProperty to retrieve the name
of a property. You can then use the retrieved name as an argument to GetProperty
to retrieve the property value, or with SetProperty to assign property values.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

This Siebel eScript example uses GetFirstProperty() to begin retrieving the


properties of an input property set.
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
var propName = "";
var propVal = "";
propName = Inputs.GetFirstProperty();
while (propName <> "")
{
propVal = Inputs.GetProperty(propName);
if (!Outputs.PropertyExists(propName)
{
Outputs.SetProperty(propName, propVal);
}
propName = Inputs.GetNextProperty()
}
return (CancelOperation);
}

See Also

Version 6.0

GetNextProperty on page 3-212, GetProperty on page 3-213

Siebel Object Interfaces Reference

3-211

Interfaces Reference
Property Set Methods

GetNextProperty

This method returns the next property in a property set.


oPropSet.GetNextProperty()

Syntax

Parameter

Description

Not applicable

Returns

A string representing the name of the next property in a property set.

Usage

After retrieving the name of the first property with the GetFirstProperty method,
GetNextProperty should be used in a loop, to be terminated when a null string ("")
is returned. When property names have been retrieved, they may be used as
parameters to GetProperty in order to retrieve the property value, or with
SetProperty to assign property values.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

For examples, see Copy on page 3-206 and GetFirstProperty on page 3-211.

See Also

GetFirstProperty on page 3-211 and GetProperty on page 3-213

3-212

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

GetProperty

This method returns the value of a property when given the property name.
Syntax

oPropSet.GetProperty(propName)
Parameter

Description

propName

A string representing the name of a property as returned by GetFirstProperty


or GetNextProperty

Returns

A string representing the value stored in the property indicated by propName, or an


empty string ("") if the property does not exist.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

The following fragment of Siebel eScript code receives a set of input properties used
with the Shipping Engine service described in Service_PreInvokeMethod on
page 3-200.
var Inputs = TheApplication().NewPropertySet();
var
var
var
var

See Also

Version 6.0

sShipper = Inputs.GetProperty("Shipping Company");


dWeight = Val(Inputs.GetProperty("Weight"));
dSize = Val(Inputs.GetProperty("Total Dimensions"));
iZone = Val(Inputs.GetProperty("Zone"));

GetFirstProperty on page 3-211, GetNextProperty on page 3-212, and SetProperty on


page 3-221

Siebel Object Interfaces Reference

3-213

Interfaces Reference
Property Set Methods

GetType

This method retrieves the data value stored in the type attribute of a property set.
oPropSet.GetType

Syntax

Parameter

Description

Not applicable

Returns

A string representing the value stored in the type attribute of the property set.

Usage

Type, like value, is a special storage location for a data value.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetValue on page 3-215 and SetType on page 3-222

3-214

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

GetValue

This method retrieves the data value stored in the value attribute of a property set.
Syntax

oPropSet.GetValue
Parameter

Description

Not applicable

Returns

A string representing the data value stored in the value attribute of a property set.

Usage

Value, like type, is a special storage location for a data value.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetProperty on page 3-213, GetType on page 3-214, and SetValue on page 3-223

Version 6.0

Siebel Object Interfaces Reference

3-215

Interfaces Reference
Property Set Methods

InsertChildAt

This method inserts a child property set into a parent property set at a specific
location.
oPropSet.InsertChildAt childObject, index

Syntax

Parameter

Description

childObject

A property set to be made subsidiary to the property set indicated by


oPropSet

index

An integer representing the position at which childObject is to be inserted

Returns

Not applicable

Usage

This method inserts the property set childObject at the location index. Index
numbers start at 0. When a child property set is inserted, the property set previously
at the location index has its index increased by 1, as do all subsequent child
property sets.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

AddChild on page 3-204

3-216

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

PropertyExists

This method returns a Boolean value indicating whether a specified property exists
in a property set.
Syntax

oPropSet.PropertyExists(propName)
Parameter

Description

propName

A string representing the name of the property to be found

Returns

In Siebel VB, an integer (0 for false, 1 for true); in all other interfaces, a Boolean.

Usage

Since GetProperty returns a null string ("") for all nonexistent properties, you
should use PropertyExists() in an if statement to determine whether a specific
property has been set.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

For an example, see GetFirstProperty on page 3-211.

Version 6.0

Siebel Object Interfaces Reference

3-217

Interfaces Reference
Property Set Methods

RemoveChild

This method removes a child property set from a parent property set.
oPropSet.RemoveChild index

Syntax

Parameter

Description

index

An integer representing the index number of the child property set to be


removed

Returns

Not applicable

Usage

When a child property set is removed, all child property sets with indexes higher
than that of the removed set have their indexes decremented by 1.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

The following Siebel VB code fragment removes all child property sets of a property
set.
Dim i As Integer
for i = 0 to outputs.GetChildCount()
outputs.RemoveChild(0)
Next i

See Also

3-218

AddChild on page 3-204 and InsertChildAt on page 3-216

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

RemoveProperty

This method removes a property from a property set.


Syntax

oPropSet.RemoveProperty propName
Parameter

Description

propName

The name of the property to be removed

Returns

Not applicable

Usage

This method removes the property propName from the property set oPropSet.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Version 6.0

Siebel Object Interfaces Reference

3-219

Interfaces Reference
Property Set Methods

Reset

This method removes all properties and child property sets from a property set.
oPropSet.Reset()

Syntax

Parameter

Description

Not applicable

Returns

Not applicable

Usage

This method removes all properties and children from a property set, allowing the
property set to be reused with new properties.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

3-220

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

SetProperty

This method assigns a data value to a property in a property set.


Syntax

oPropSet.SetProperty propName, propValue


Parameter

Description

propName

A string representing the name of a property

propValue

A string representing the value to be assigned to propName

Returns

Not applicable

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

Example

This Siebel VB fragment makes use of the business service Shipping Engine,
which is illustrated in Service_PreInvokeMethod on page 3-200.
Dim
Dim
Set
Set

Svc As Service
Inputs As PropertySet, Outputs As PropertySet
Svc = theApplication.GetService("Shipping Engine")
Inputs = theApplication.NewPropertySet()

With Inputs
.SetProperty
.SetProperty
.SetProperty
.SetProperty
End With

See Also

Version 6.0

"Shipping Company", "Airline"


"Weight", "12"
"Total Dimensions", "48"
"Shipping Method", "Second-Day Air"

GetProperty on page 3-213

Siebel Object Interfaces Reference

3-221

Interfaces Reference
Property Set Methods

SetType

This method assigns a data value to the type attribute of a property set.
oPropSet.SetType type

Syntax

Parameter

Description

type

A string representing data to be stored in the type attribute

Returns

Not applicable

Usage

Type, like value, is a special storage location for a data value.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetType on page 3-214 and SetValue on page 3-223

3-222

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Property Set Methods

SetValue

This method assigns a data value to the value attribute of a property set.
Syntax

oPropSet.SetValue value
Parameter

Description

value

A string representing data to be stored in the value attribute

Returns

Not applicable

Usage

Values, like properties and types, are simply storage locations for a data value.

Used With

Siebel VB, Siebel eScript, COM Automation Server, COM Data Server, ActiveX
Application Control, ActiveX Data Control, Java Data Bean, CORBA Object Manager

See Also

GetValue on page 3-215, SetProperty on page 3-221 and SetValue on page 3-223

Version 6.0

Siebel Object Interfaces Reference

3-223

Interfaces Reference
Control Methods

Control Methods

In the methods that follow, the placeholder controlVar stands for the name of the
control on which the method is invoked; for example, Button1_Click.

Applet

The Applet method returns the parent applet object for a control.
controlVar.Applet

Syntax

Argument

Description

Not applicable

Returns

The parent applet of the control.

Usage

Obtaining the parent applet allows you to perform operations on the applet object,
not just the control.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

3-224

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Control Methods

BusComp

The BusComp method returns the corresponding business component for


the control.
Syntax

controlVar.BusComp
Argument

Description

Not applicable

Returns

The business component associated with the controls parent applet.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Version 6.0

Siebel Object Interfaces Reference

3-225

Interfaces Reference
Control Methods

BusObject

The BusObject method returns the corresponding business object for a control. This
is a shortcut for getting the business object associated with the parent applet.
controlVar.BusObject

Syntax

Argument

Description

Not applicable

Returns

The business object containing the business component used by the parent applet
of the control.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

In Siebel VB:
Dim oControl as Control
Dim oBusObject as BusObject
Dim oBusComp as BusComp
Set oBusObject = oControl.BusObject

3-226

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Control Methods

GetProperty

The GetProperty method returns the value of a control property.


controlVar.GetProperty(propName)
Argument

Description

propName

The name of the property to be retrieved, which must be one of the following
strings:

 BackgroundColor
 ForegroundColor
 TextStyle
 Enabled
 Shown

The following table lists the type of value that can be retrieved for each property
type.

Version 6.0

Property

Value

Description

BackgroundColor

rrr ggg bbb

A string containing a set of three integer values,


separated by spaces, representing the RGB values
for the background color; for example,
0 240 128

ForegroundColor

rrr ggg bbb

A string containing a set of three integer values,


separated by spaces, representing the RGB values
for the text color; for example, 255 0 255

TextStyle

textStyleName

The name of a text style object defined in the


repository

Enabled

true or false

Is the button active? (unless explicitly modified by


using SetProperty, default is TRUE)

Shown

true or false

Is the control shown? (unless explicitly modified by


using SetProperty, default is as defined in the
repository)

Siebel Object Interfaces Reference

3-227

Interfaces Reference
Control Methods

Returns

The value of the specified property

Usage

RGB values are always between 0 and 255.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

For an example, see SetProperty on page 3-231.

See Also

SetProperty on page 3-231

3-228

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Control Methods

GetValue

The GetValue method returns the value of the control. The type of the return value
depends on the specific control object.
Syntax

controlVar.GetValue
Argument

Description

Not applicable

Returns

The value of the control, of the data type that the control displays.

Usage

The GetValue and SetValue methods will work only for controls that are associated
with business component fields. Therefore, these methods are not applicable
to labels.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a COM Automation Server example. In this example,


ActiveControlValue is the name of a Microsoft Visual Basic text box.
Private Sub ControlValue_Click()
Dim errCode As Integer
Dim oControl as Control
If Not oControl Is Nothing Then
ActiveControlValue.Text = oControl.GetValue (errCode)
End If
Status.Text = SiebelApplication.GetLastErrText
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-229

Interfaces Reference
Control Methods

Name

The Name method returns the name of the object.


controlVar.Name

Syntax

Argument

Description

Not applicable

Returns

A string containing the object name.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

For an example, see the business component method Name on page 3-133.

3-230

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Control Methods

SetProperty

The SetProperty method sets visual properties of a control.


Syntax

controlVar.SetProperty(propName, propValue)
Argument

Description

propName

The name of the property to be set, as described in the following table

propValue

The value to assign to the property, as described in the following table

The following table lists the properties that can be set for a control, and the values
that can be assigned to them
Property

Value

Description

BackgroundColor

rrr ggg bbb

A set of three integers, enclosed in quotes and


separated by spaces, representing the RGB values
for the background color; for example,
"0 240 128"

ForegroundColor

rrr ggg bbb

A set of three integers, enclosed in quotes and


separated by spaces, representing the RGB values
for the text color; for example, "255 0 255"

TextStyle

textStyleName

The name of a text style object defined in the


repository

Enabled

true or false

Is the button active? (unless explicitly modified by


using SetProperty, default is TRUE)

Shown

true or false

Is the control shown? (unless explicitly modified by


using SetProperty, default is as defined in the
repository)

Returns

Not applicable

Usage

If more than one property is to be set, each must be set in a separate statement.
RGB values must be between 0 and 255.

Version 6.0

Siebel Object Interfaces Reference

3-231

Interfaces Reference
Control Methods

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Example

Here is a Siebel eScript example.


var oControl = FindControl("Shipping");
with (oControl)
{
SetProperty("BackgroundColor", "215 152 4");
SetProperty("ForegroundColor", "255 255 255"); //White
SetProperty("textStyle", "Underline");
if (GetProperty("Shown") = "false")
SetProperty("Shown", "true");
TheApplication().MsgBox("Foreground color is " +
GetProperty("ForegroundColor") + "\nText style is " +
GetProperty("textStyle"));
}

See Also

3-232

GetProperty on page 3-227

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Control Methods

SetValue

The SetValue method sets the contents of the specified control to the
value indicated.
Syntax

controlVar.SetValue (controlValue)
Argument

Description

controlValue

String containing the value to which to set the control

Returns

Not applicable

Usage

The GetValue and SetValue methods will work only for controls that are associated
with business component fields. Therefore, these methods are not applicable to
labels. SetValue sets the contents of a control. The user can still change those
contents before they are committed to the BusComp field.

Used With

Siebel VB, Siebel eScript, COM Automation Server, ActiveX Application Control

Version 6.0

Siebel Object Interfaces Reference

3-233

Interfaces Reference
Web Applet Methods

Web Applet Methods

BusComp

BusComp returns the business component that is associated with the Web applet.
oWebApplet.BusComp

Syntax

Argument

Description

Not applicable

Returns

The business component associated with the Web applet.

Used With

Siebel VB, Siebel eScript

BusObject

BusObject returns the business object for the business component for the Web
applet.
oWebApplet.BusObject

Syntax

Argument

Description

Not applicable

Returns

The business object for the Web applets business component.

Used With

Siebel VB, Siebel eScript

3-234

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Web Applet Methods

InvokeMethod

The InvokeMethod method calls a specialized method or user-defined method


defined for the Web applet.
VB Syntax

eScript
Syntax

oWebApplet.InvokeMethod(methodName, methodArgs)
Argument

Description

methodName

The name of the method

methodArgs

Arguments can be a single string or an array of strings

oWebApp.InvokeMethod(methodName, methArg1, methArg2, ..., methArgn);


Argument

Description

methodName

The name of the method

methArg1, methArg2, ..., methArgn

One or more strings containing arguments to


methodName

Returns

A string containing the method return value.

Usage

InvokeMethod should be used only to call supported specialized methods or userdefined methods for the Web applet.

Used With

Siebel VB, Siebel eScript

Version 6.0

Siebel Object Interfaces Reference

3-235

Interfaces Reference
Web Applet Methods

Name

The Name method returns the name of the Web applet.


oWebApplet.Name

Syntax

Argument

Description

Not applicable

Returns

A string containing the Web applet object name.

Used With

Siebel VB, Siebel eScript

3-236

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Web Applet Events

Web Applet Events

WebApplet_InvokeMethod

The InvokeMethod event is called after a specialized method or a user-defined


method on the Web applet has been executed.
Syntax

WebApplet_InvokeMethod(methodName)
Argument

Description

methodName

String variable or literal containing the name of the method invoked

Returns

Not applicable

Used With

Siebel VB, Siebel eScript

See Also

Applet_InvokeMethod on page 3-42, Application_InvokeMethod on page 3-92, and


WebApplet_PreInvokeMethod on page 3-238

Version 6.0

Siebel Object Interfaces Reference

3-237

Interfaces Reference
Web Applet Events

WebApplet_PreInvokeMethod

The PreInvokeMethod event is called before a specialized method for the Web
applet is invoked by the system or a user-defined method is invoked via
oWebApplet.InvokeMethod.
WebApplet_PreInvokeMethod(methodName)

Syntax

Argument

Description

methodName

String variable or literal containing the name of the method invoked

Returns

ContinueOperation or CancelOperation

Usage

The PreInvokeMethod event is called just before a specialized method is invoked on


the Web applet. If implementing a new method (not defined by the built-in
functions), the script should return CancelOperation to avoid invoking an
Unknown Method Name error.
CancelOperation does not stop the execution of the code following it, but it does
prevent the execution of any built-in code associated with this event.
WebApplet_PreInvokeMethod should return CancelOperation when you are
handling the event entirely through scripting and you dont want the built-in code
to execute. However, if there is code in the same script following CancelOperation,
that code will run regardless of the CancelOperation.

Used With

3-238

Siebel VB, Siebel eScript

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Web Applet Events

WebApplet_ShowControl

This event allows scripts to modify the HTML generated by the Siebel Web Engine
to render a control on a Web page in a .COM application.
Syntax

WebApplet_ShowControl (controlName, property, mode, HTML)


Parameter

Description

controlName

A string indicating the name of the control to be rendered

property

A string indicating the value of the property attribute of the swe:control


or swe:this tag that triggers this event; it can also be a empty string if
this attribute is not specified for the tag

mode

The mode of the applet that is being shown; possible modes are:

 Base
 Edit
 New
 Query
 Sort
HTML

The HTML generated by the Siebel Web Engine for the swe:control or
swe:this tag that triggers this event

Returns

Not applicable

Usage

The generated HTML depends on the control, the property being shown, and the
mode of the applet. The script can modify the value of the HTML parameter, and
the Siebel Web Engine will send the modified value back to the Web browser.

Version 6.0

Siebel Object Interfaces Reference

3-239

Interfaces Reference
Web Applet Events

.COM applications render the layout of applets using template files (.swt files).
These are HTML files that contain special placeholder tags that indicate where a
control is to be rendered. These control placeholder tags (<swe:control>) can be
included in the following two ways:

 The <swe:control> tag by itself is used to show a control:


<swe:control id="1" property="DisplayName"/>

 The <swe:control> tag and <swe:this> tag are used to show a control.
<swe:control id="1">
.
.
.
<swe:this property="DisplayName"/>
.
.
.
</swe:control>

In the first instance, if the control ID is mapped to an actual control in the applet
using Siebel Tools, Siebel Web Engine will render the DisplayName property of the
control at the point where this tag is placed in the template file.
In the second instance, the Siebel Web Engine renders the DisplayName property of
the control at the point where the <swe:this> tag is placed in the template file.
The outer <swe:control> tag in this case is used only to check if the control ID
is mapped to an actual control in the applet.
The Siebel Web Engine converts these tags into HTML to render the controls on the
Web page. The WebApplet_ShowControl event is triggered for each of these tags
after the Siebel Web Engine has generated the HTML for rendering the control, but
before the generated HTML is sent back to the browser. This gives the scripts a
chance to modify the generated HTML before it is shown.

3-240

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Web Applet Events

In the first example, the event fires only once, after the HTML for the
<swe:control> tag is generated by the Siebel Web Engine. In the second
example, this event gets fired twice. The event is first fired when the Siebel Web
Engine has generated the HTML for the <swe:this> tag. The event is fired again
when the Siebel Web Engine has generated the HTML for the outer
<swe:control> tag; that is, after everything between the <swe:control> and
</swe:control> tags, including the <swe:this> tag, is converted into HTML.
The script can distinguish between these two event calls by the value of the
property attribute of the tag that is passed as a parameter to the event.
Used With

Siebel VB, Siebel eScript

See Also

WebApplet_ShowListColumn on page 3-242

Example

This Siebel eScript script displays negative amounts in red in a read-only form.
function WebApplet_ShowControl (ControlName, Property, Mode, &HTML)
{
var BC = me.BusComp;
if( ControlName == "Amount" && Mode == "Base" && Property ==
"FormattedHTML")
{
var amount = ToNumber(BC.GetFieldValue ("Transaction
Amount"));
If amount < 0
HTML = "<FONT Color=Red> " + HTML + " </FONT>";
}
}

Version 6.0

Siebel Object Interfaces Reference

3-241

Interfaces Reference
Web Applet Events

WebApplet_ShowListColumn

This event allows scripts to modify the HTML generated by the Siebel Web Engine
to render a list column on a Web page in a .COM application.
Syntax

WebApplet_ShowListColumn (columnName, property, mode, HTML)


Parameter

Description

columnName

A string indicating the name of the list column to be rendered

property

A string indicating the value of the property attribute of the swe:control


or swe:this tag that triggers this event; it can also be a empty string if
this attribute is not specified for the tag

mode

The mode of the applet that is being shown; possible modes are:

 Base
 Edit
 New
 Query
 Sort
HTML

Returns

3-242

The HTML generated by the Siebel Web Engine for the swe:control or
swe:this tag that triggers this event

Not applicable

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Web Applet Events

Usage

The generated HTML depends on the list column, the property being shown, and
the mode of the applet. The script can modify the value of the HTML parameter,
and the Siebel Web Engine will send the modified value back to the Web browser.
.COM applications render the layout of applets using template files (.swt files).
These are HTML files that contain special placeholder tags that indicate where a
control is to be rendered. These control placeholder tags (<swe:control>) can be
included in the following two ways:

 The <swe:control> tag by itself is used to show a list column:


<swe:control id="1" property="DisplayName"/>

 The <swe:control> tag and <swe:this> tag are used to show a list
column:
<swe:control id="1">
.
.
.
<swe:this property="DisplayName"/>
.
.
.
</swe:control>

In the first instance, if the list column ID is mapped to a list column in the applet
using Siebel Tools, Siebel Web Engine will render the DisplayName property of the
list column at the point where this tag is placed in the template file.
In the second instance, the Siebel Web Engine renders the DisplayName property of
the list column at the point where the <swe:this> tag is placed in the template
file. The outer <swe:control> tag in this case is used only to check if the list
column ID is mapped to an actual list column in the applet.
The Siebel Web Engine converts these tags into HTML to render the list columns on
the Web page. The WebApplet_ShowListColumn event is triggered for each of these
tags after the Siebel Web Engine has generated the HTML for rendering the list
column, but before the generated HTML is sent back to the browser. This gives the
scripts a chance to modify the generated HTML before it is shown.

Version 6.0

Siebel Object Interfaces Reference

3-243

Interfaces Reference
Web Applet Events

In the first example, the event fires only once, after the HTML for the
<swe:control> tag is generated by the Siebel Web Engine. In the second
example, this event is triggered twice. The event is first triggered when the Siebel
Web Engine has generated the HTML for the <swe:this> tag. The event is fired
again when the Siebel Web Engine has generated the HTML for the outer
<swe:control> tag; that is, after everything between the <swe:control> and
</swe:control> tags, including the <swe:this> tag, is converted into HTML.
The script can distinguish between these two event calls by the value of the
property attribute of the tag that is passed as a parameter to the event.
Used With

Siebel VB, Siebel eScript

See Also

WebApplet_ShowControl on page 3-239

Example

This Siebel VB script displays negative amounts in a list in red.


Sub WebApplet_ShowListColumn (ColumnName As String, Property As
String, Mode As String, HTML As String)
Dim BC as BusComp
Dim amount as Double
Set BC = me.BusComp
If ColumnName = "Amount" and Mode = "Base" and Property = _
"FormattedHTML" Then
amount = Val(BC.GetFieldValue ("Transaction Amount"))
If amount < 0 Then
HTML = "<FONT Color=Red> " + HTML + " </FONT>"
End If
End If
End Sub

3-244

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
SiebelAppFactory Methods

SiebelAppFactory Methods

CreateSiebelAppObject

CreateSiebelAppObject returns a CORBA object reference for an Application object.


An object reference for the SiebelAppFactory is available when the Object Request
Broker is initialized. You can then use SiebelAppFactory.CreateSiebelAppObject to
create Application object references.
Syntax

factoryRef->CreateSiebelAppObject()
Argument

Description

Not applicable

Returns

A CORBA object reference for a Siebel Application Object.

Usage

Obtain the SiebelAppFactory object reference as shown below in the example. Then
invoke SiebelAppFactory.CreateSiebelAppObject to obtain an object reference for a
Siebel Application object.

Used With

CORBA Object Manager

Example

This C++ example illustrates how to get a reference for the SiebelAppFactory.
char* strServerName = new char[SERVER_NAME_LEN];
char* strHostName = "SCOMSERVER";
// append the host name to the server name
strcpy(strServerName,"SiebelObjectFactory:SiebelCorbaServer");
try {
// bind to the Factory object in the server.
appFact = SiebelAppFactory::_bind(strServerName, strHostName);
} catch(const CORBA::SystemException& excep) {
cout << "Error binding to SiebelObjectFactory" <<
endl;
return;
}

Version 6.0

Siebel Object Interfaces Reference

3-245

Interfaces Reference
SiebelAppFactory Methods

CreateSiebelAppObject returns the reference to the Siebel Application Object.


SiebelApplication_var appObj;
try {
appObj = appFact->CreateSiebelAppObject();
cout << "Created Siebel object" << endl;
}
catch (const SiebelException& seblExcep) {
cerr << "Error id
: " << seblExcep.id << endl;
cerr << "Error text : " << endl;
cerr << seblExcep.desc << endl;
return;
}
try {
// call the login method to access the Siebel application
appObj->Login("CCONWAY", "CCONWAY");
// Get the reference to the Accounts business object
pBusObj = appObj->GetBusObject("Account");
} catch (SiebelException& excep) {
cerr << "Error code : " << excep.id << endl;
cerr << "Error text : " << excep.desc << endl;
return;
}

3-246

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Miscellaneous Methods and Events

Miscellaneous Methods and Events

ControlName_Click

The Click event is called when the user clicks a push-button control.
Syntax

Usage

ControlName_Click
Argument

Description

ControlName

Name of the control to which the click event applies

The control event procedures are made up of the control name and the event name.
Both are necessary because control event procedures are actually stored in the same
module that contains their applet procedures.
This method should not be used in combination with the MethodInvoked property,
but is rather an alternative to it. ControlName_Click looks for user-defined methods
in Applet_PreInvokeMethod and then in BusComp_PreInvokeMethod, but it will
not look in Application_PreInvokeMethod.

Used With

Siebel VB, Siebel eScript

Example

The following VB example launches Microsoft Excel upon the click of a user-defined
button.
Sub btnExcel_Click
Dim i as long
i = Shell("C:\Program Files\Microsoft Office\Office\EXCEL.EXE",1)
End Sub

Version 6.0

Siebel Object Interfaces Reference

3-247

Interfaces Reference
Miscellaneous Methods and Events

GetErrorCode

This method is used with the Java Data Bean to display numeric error codes.
public int getErrorCode()

Syntax

Parameter

Description

Not applicable

Returns

A numeric error code.

Used With

Java Data Bean

See Also

GetErrorMessage on page 3-248

GetErrorMessage

This method is used with the Java Data Bean to display error messages.
public string getErrorMessage()

Syntax

Parameter

Description

Not applicable

Returns

A string containing an error message.

Used With

Java Data Bean

See Also

GetErrorCode on page 3-248

3-248

Siebel Object Interfaces Reference

Version 6.0

Interfaces Reference
Miscellaneous Methods and Events

theApplication

theApplication is a global method that returns the unique object of type


Application. This is the root of all objects within the Siebel Applications object
hierarchy. Use this method to determine the object reference of the application,
which is later used to find other objects or to invoke methods on the
application object.
VB Syntax

theApplication

eScript
Syntax

TheApplication()
Argument

Description

Not applicable

Returns

Application, an object for use in finding other objects or invoking methods.

Usage

For convenience, the Siebel applications provide the shortcut constant


theApplication.

Used With

Siebel VB, Siebel eScript

Example

To retrieve the login name from the application object and create the Employee
business object:
Dim oEmpBusObj as BusObject
Dim sLoginName as String
sLoginName = theApplication.LoginName
Set oEmpBusObj = theApplication.GetBusObject("Employee")
Set oEmpBusObj = Nothing

Version 6.0

Siebel Object Interfaces Reference

3-249

Interfaces Reference
Miscellaneous Methods and Events

3-250

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference

Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-13
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-13
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-17
Miscellaneous Interfaces and Events . . . . . . . . . . . . . . . . . . . . . . . . . A-18

Version 6.0

Siebel Object Interfaces Reference

A-1

Siebel VB Quick Reference


Applet

Applet
Table A-1.

Applet Methods Syntax Summary

Method

Description

Syntax

ActiveControl

Function that returns the control that


currently has the input focus within
the applet.

Dim oApplet as Applet


Dim oControl as Control
Set oControl = oApplet.ActiveControl

Function that returns the business


component that is associated with
the applet.

Dim oApplet as Applet


Dim oBusComp as BusComp
Set oBusComp = oApplet.BusComp

Function that returns the business


object for the business component
for the applet.

Dim oApplet as Applet


Dim oBusObject as BusObject
Set oBusObject = oApplet.BusObject

Navigates to the view that


corresponds to the argumentspecified drilldown object.

Dim oApplet as Applet


oApplet.Drilldown drilldown_object as string

Function that returns the ActiveX


control whose name is specified in
the argument.

Dim oApplet
Dim control
Set control
controlName

Function that returns the control


whose name is specified in the
argument.

Dim oApplet as Applet


Dim control as Control
Set control = oApplet.FindControl controlName
as String

Navigates to the argument-named


control.

Dim oApplet as Applet


oApplet.GotoControl controlObj as Control

Calls an argument-specified
specialized method.

Dim oApplet as Applet


oApplet.InvokeMethod methodName as String,
methodArgs as String or StringArray

Function that returns the name of the


applet.

Dim oApplet as Applet


Dim sApplet as String
sApplet = oApplet.Name

Posts the changes made to the applet.

Dim oApplet as Applet


Dim iReturn as Integer
iReturn = oApplet.PostChanges

page 3-25
BusComp
page 3-26
BusObject
page 3-28
Drilldown
page 3-29
FindActiveXControl
page 3-31

FindControl
page 3-32

GotoControl
page 3-33
InvokeMethod
page 3-34
Name
page 3-36
PostChanges
page 3-37

A-2

Siebel Object Interfaces Reference

as Applet
as Control
= oApplet.FindActiveXControl
as String

Version 6.0

Siebel VB Quick Reference


Applet

Table A-2.

Applet Events Summary

Event

Description

Syntax

Applet_ChangeRecord

Called when
the applet
gets the
focus.

Applet_GotFocus

Called when
applet.Invoke
Method is
called.

Applet_InvokeMethod(MethodName as String)

Called when
the applet
loses focus.

Applet_LostFocus

Called before
a specialized
method is
invoked.

Applet_PreInvokeMethod(MethodName as String)

page 3-39

Applet_InvokeMethod
page 3-42

Applet_Load
page 3-43
Applet_PreInvokeMethod
page 3-46

Version 6.0

Siebel Object Interfaces Reference

A-3

Siebel VB Quick Reference


Application

Application
Table A-3.

Application Methods Syntax Summary

(Sheet 1 of 3)

Method

Description

Syntax

ActiveApplet

Function that returns the applet that has


the input focus.

Dim oApplication as Application


Dim oApplet as Applet
Set oApplet = oApplication.ActiveApplet

Function that returns the business


component associated with the active
applet.

Dim oApplication as Application


Dim oBusComp as BusComp
Set oBusComp = oApplication.ActiveBusComp

Function that returns the business


object for the business component for
the active applet.

Dim oApplication as Application


Dim oBusObject as BusObject
Set oBusObject = oApplication.ActiveBusObject

Function that returns the control that


has the input focus.

Dim oApplication as Application


Dim control as Control
Set control = oApplication.ActiveControl

Function that returns the name of


the active view.

Dim oApplication as Application


Dim sView as String
sView = oApplication.ActiveViewName

Function that returns the three-letter


operating currency code.

Dim oApplication as Application


Dim sCur as String
sCur = oApplication.CurrencyCode

Function that returns the applet object


identified in the argument.

Dim oApplication as Application


Dim oApplet as Applet
set oApplet = oApplication.FindApplet
appletName as String

Instantiates and returns a new instance


of the argument-specified business
object.

Dim oApplication as Application


Dim oBusObject as BusObject
set oBusObject = oApplication.GetBusObject
busobject as String

Returns the value of an attribute in a


user profile.

Dim oApplication as Application


Dim sAttr as String
SAttr = oApplication.GetProfileAttr(name as
String)

Instantiates and returns a new instance


of the argument-specified service.

Dim oApplication as Application


Dim oService as Service
set oService =
oApplication.GetService(serviceName as String)

page 3-48
ActiveBusComp
page 3-49
ActiveBusObject
page 3-50
ActiveControl
page 3-51
ActiveViewName
page 3-53
CurrencyCode
page 3-54
FindApplet
page 3-56

GetBusObject
page 3-57

GetProfileAttr
page 3-60

GetService
page 3-61

A-4

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Application

Table A-3.

Application Methods Syntax Summary

(Sheet 2 of 3)

Method

Description

Syntax

GetSharedGlobal

Gets the shared user-defined global


variables.

Dim oApplication as Application


Dim sName as String
sName = Application.GetSharedGlobal(varName as
String)

Sets the focus to the specified applet.

Dim oApplication as Application


oApplication.GotoApplet appletObj as Applet

Activates the named view and its


business object.

Dim oApplication as Application


oApplication.GotoView viewName as String,
[BusinessObjectName as string]

Prompts user for input.

Dim oApplication as Application


Dim sInput as String
sInput = oApplication.InputBox(prompt as String
[,title as String][,default as String][,xpos as
Integer][,ypos as Integer])

Calls the named specialized method.

Dim oApplication as Application


Dim sReturn as String
sReturn = oApplication.InvokeMethod(methodName
as String, methodArgs as String or StringArray)

Function that returns the login ID of the


user who started the Siebel application.

Dim oApplication as Application


Dim sID as String
iID = oApplication.LoginId

Function that returns the login name of


the user who started the Siebel
application.

Dim oApplication as Application


Dim sUser as String
sUser = oApplication.LoginName

Displays a message box.

Dim oApplication as Application


Dim iResponse as Integer
iResponse = oApplication.MsgBox(prompt as
String [,buttons as Integer][,title as String])

Constructs and returns a new property


set object.

Dim oApplication as Application


Dim oPropSet as ProperySet
oPropSet = oApplication.NewPropertySet()

Function that returns the position ID


that describes the users current
position.

Dim oApplication as Application


Dim sRow as String
sRow = oApplication.PositionId

Function that returns the position name


of the users current position.

Dim oApplication as Application


Dim sPosition as String
sPosition = oApplication.PositionName

page 3-61

GotoApplet
page 3-63
GotoView
page 3-64
InputBox
page 3-66

InvokeMethod
page 3-68

LoginId
page 3-72
LoginName
page 3-73
MsgBox
page 3-75

NewPropertySet
page 3-78
PositionId
page 3-79
PositionName
page 3-80

Version 6.0

Siebel Object Interfaces Reference

A-5

Siebel VB Quick Reference


Application

Table A-3.

Application Methods Syntax Summary

(Sheet 3 of 3)

Method

Description

Syntax

SetProfileAttr

Used in personalization to assign values


to attributes in a user profile.

Dim oApplication as Application


oApplication.SetProfileAttr name as String,
value as String

Sets a shared user-defined


global variable.

Dim oApplication as Application


oApplication.SetSharedGlobal varName as String,
value as String

Displays a message in the status bar.

Dim oApplication as Application


oApplication.ShowStatus message as String

Appends a message to the trace file.

Dim oApplication as Application


oApplication.Trace message as String

Turns off the tracing started by TraceOn.

Dim oApplication as Application


oApplication.TraceOff

Turns tracing on.

Dim oApplication as Application


oApplication.TraceOn filename as String, type
as Integer, selection as Integer

page 3-83
SetSharedGlobal
page 3-82
ShowStatus
page 3-84
Trace
page 3-85
TraceOff
page 3-87
TraceOn
page 3-88

Table A-4.

Application Events Summary

Event

Description

Syntax

Application_Close

Called before the


application exits.

Application_Close

Called after a
specialized method is
invoked.

Application_InvokeMethod(methodName as String)

Called when a user


exits the application.

Application_PreClose

Called before a
specialized method is
invoked.

Application_PreInvokeMethod(methodName as String)

Called when the client


starts.

Application_Start(commandLine as String)

page 3-91
Application_InvokeMethod
page 3-92
Application_PreClose
page 3-93
Application_PreInvokeMethod
page 3-94
Application_Start
page 3-96

A-6

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Business Component

Business Component
Table A-5.

Business Component Methods Syntax Summary

(Sheet 1 of 4)

Method

Description

Syntax

ActivateField

Allows queries to retrieve


data for the specified field.

Dim oBusComp as BusComp


oBusComp.ActivateField fieldName as String

Enables updates to the user


interface that result from
changes to the business
component.

Dim oBusComp as BusComp


oBusComp.AllowNotification

Creates a new many-tomany relationship for the


parent object through an
association business
component.

Dim oBusComp as BusComp


oBusComp.Associate whereIndicator as Integer

Function that returns the


business object that
contains the business
component.

Dim oBusComp as BusComp


Dim oBusObject as BusObject
Set oBusObject = oBusComp.BusObject

Clears the current query


and sort specifications on
the business component.

Dim oBusComp as BusComp


oBusComp.ClearToQuery

Deactivates all currently


activated fields.

Dim oBusComp as BusComp


oBusComp.DeactivateFields

Removes the current record


from the business
component.

Dim oBusComp as BusComp


oBusComp.DeleteRecord

Fetches a set of BusComp


records.

Dim oBusComp as BusComp


oBusComp.ExecuteQuery cursorMode as Integer

Fetches a set of BusComp


records.

Dim oBusComp as BusComp


oBusComp.ExecuteQuery2 cursorMode as Integer,
ignoreMaxCursorSize as Integer

Moves to the first record in


the business component.

Dim oBusComp as BusComp


Dim iIsRecord as Integer
iIsRecord = oBusComp.FirstRecord

Moves to the first record of


the multiple selection in
the business component.

Dim oBusComp as BusComp


Dim iIsMultipleSection as Integer
iIsMultipleSelection = oBusComp.FirstSelected

page 3-98
AllowNotification
page 3-100

Associate
page 3-101

BusObject
page 3-103

ClearToQuery
page 3-104
DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111
FirstSelected
page 3-112

Version 6.0

Siebel Object Interfaces Reference

A-7

Siebel VB Quick Reference


Business Component

Table A-5.

Business Component Methods Syntax Summary

(Sheet 2 of 4)

Method

Description

Syntax

GetAssocBusComp

Function that returns the


association business
component.

Dim oBusComp as BusComp


Dim AssocBusComp as BusComp
Set AssocBusComp = oBusComp.GetAssocBusComp

Function that returns a


value for the argumentspecified field.

Dim oBusComp as BusComp


Dim sValue as String
sValue = oBusComp.GetFieldValue(FieldName as
String)

Function that returns a


formatted value for the
argument-specified field.

Dim oBusComp as BusComp


Dim sValue as String
sValue = oBusComp.GetFormattedFieldValue(FieldName
as String)

Function that returns the


MVG business component
associated with the
argument-specified field.

Dim oBusComp as BusComp


Dim MvgBusComp as BusComp
set MvgBusComp = oBusComp.GetMVGBusComp(FieldName
as String)

Function that returns the


argument-named search
specification.

Dim oBusComp as BusComp


Dim sValue as String
sValue = oBusComp.GetNamedSearch(SearchName as
String)

Function that returns the


pick business component
associated with the
argument-specified field.

Dim oBusComp as BusComp


Dim pickBusComp as BusComp
Set pickBusComp =
oBusComp.GetPicklistBusComp(FieldName as String)

Function that returns the


current search expression.

Dim oBusComp as BusComp


Dim sExpr as String
sExpr = oBusComp.GetSearchExpr

Function that returns the


current search specification
for the argument-specified
field.

Dim oBusComp as BusComp


Dim sSpec as String
sSpec = oBusComp.GetSearchSpec(FieldName as String)

Function that returns the


value for an argumentspecified property name.

Dim oBusComp as BusComp


Dim sValue as String
sValue = oBusComp.GetUserProperty(propertyName as
String)

Function that returns the


visibility mode for the
business component.

Dim oBusComp as BusComp


Dim iMode as Integer
iMode = oBusComp.GetViewMode

page 3-113
GetFieldValue
page 3-115

GetFormattedFieldValue
page 3-117

GetMVGBusComp
page 3-121

GetNamedSearch
page 3-123

GetPicklistBusComp
page 3-124

GetSearchExpr
page 3-126
GetSearchSpec
page 3-127

GetUserProperty
page 3-128

GetViewMode
page 3-129

A-8

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Business Component

Table A-5.

Business Component Methods Syntax Summary

(Sheet 3 of 4)

Method

Description

Syntax

InvokeMethod

Calls the specialized


method named in the
argument.

Dim oBusComp as BusComp


Dim Return
Return = oBusComp.InvokeMethod(methodName as
String, methodArgs as String or StringArray)

Moves to the last record in


the business component.

Dim oBusComp as BusComp


Dim iReturn as Integer
iReturn = oBusComp.LastRecord

Function that returns the


name of the business
component.

Dim oBusComp as BusComp


Dim sName as String
sName = oBusComp.Name

Adds a new record to the


business component.

Dim oBusComp as BusComp


oBusComp.NewRecord(whereIndicator as Integer)

Moves to the next record in


the business component.

Dim oBusComp as BusComp


Dim iReturn as Integer
iReturn = oBusComp.NextRecord

Moves to the next record of


the current multiple
selection.

Dim oBusComp as BusComp


Dim iReturn as Integer
iReturn = oBusComp.NextSelected

Function that returns the


parent business
component.

Dim oBusComp as BusComp


Dim parentBusComp as BusComp
Set parentBusComp = oBusComp.ParentBusComp

Places the currently


selected record in a picklist
business component into
the appropriate fields of the
parent business
component.

Dim oBusComp as BusComp


oBusComp.Pick

Moves to the previous


record in the business
component.

Dim oBusComp as BusComp


Dim iReturn as Integer
iReturn = oBusComp.PreviousRecord

Refines a query after a


query has been executed.

Dim oBusComp as BusComp


oBusComp.RefineQuery

page 3-130

LastRecord
page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
NextSelected
page 3-137
ParentBusComp
page 3-138
Pick
page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142

Version 6.0

Siebel Object Interfaces Reference

A-9

Siebel VB Quick Reference


Business Component

Table A-5.

Business Component Methods Syntax Summary

(Sheet 4 of 4)

Method

Description

Syntax

SetFieldValue

Assigns a new value to the


named field for the current
row of the business
component.

Dim oBusComp as BusComp


oBusComp.SetFieldValue FieldName as String,
FieldValue as String

Accepts the field value in


the current local format
and assigns the new value
to the named field for the
current row of the business
component.

Dim oBusComp as BusComp


oBusComp.SetFormattedFieldValue FieldName as
String, FieldValue as String

Sets a named search


specification on the
business component.

Dim oBusComp as BusComp


oBusComp.SetNamedSearch searchName as String,
searchSpec as String

Sets the search


specification for the
business component.

Dim oBusComp as BusComp


oBusComp.SetSearchExpr searchSpec as String

Sets the search


specification for the
specified field.

Dim oBusComp as BusComp


oBusComp.SetSearchSpec fieldName as String,
searchSpec as String )

Sets the sort specification


for a query.

Dim oBusComp as BusComp


oBusComp.SetSortSpec sortSpec as String

Sets the value of the


specified User Property.

Dim oBusComp as BusComp


oBusComp.SetUserProperty propertyName as String,
newValue as String

Disables the updates to the


user interface that result
from changes to the
business component.

Dim oBusComp as BusComp


oBusComp.SuppressNotification

Deletes an active record


created by NewRecord.

Dim oBusComp as BusComp


oBusComp.UndoRecord

Commits to the database


any changes made to the
current record.

Dim oBusComp as BusComp


oBusComp.WriteRecord

page 3-143

SetFormattedFieldValue
page 3-145

SetNamedSearch
page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SetUserProperty
page 3-156
SuppressNotification
page 3-159

UndoRecord
page 3-160
WriteRecord
page 3-161

A-10

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Business Component

Table A-6.

Business Component Events Summary

(Sheet 1 of 2)

Event

Description

Syntax

BusComp_Associate

Called to create an
association after a record is
added to a business
component.

BusComp_Associate

Called after the current row


changes in the business
component.

BusComp_ChangeRecord

Called after a new row is


copied in the business
component.

BusComp_CopyRecord

Called after a row is deleted


in the business component.

BusComp_DeleteRecord

Calls a specialized method


whose name is specified in
its argument.

BusComp_InvokeMethod(methodName as String)

Called after a new row has


been created and made
active in the business
component.

BusComp_NewRecord

Called before a record is


added to a business
component to create an
association

BusComp_PreAssociate

Called before a new row is


copied in the business
component.

BusComp_PreCopyRecord

Called before a row is


deleted in the business
component.

BusComp_PreDeleteRecord

Called when the value of a


business component field is
accessed.

BusComp_PreGetFieldValue(FieldName as String,
FieldValue as String)

page 3-164

BusComp_ChangeRecord
page 3-165
BusComp_CopyRecord
page 3-167
BusComp_DeleteRecord
page 3-168
BusComp_InvokeMethod
page 3-169
BusComp_NewRecord
page 3-170

BusComp_PreAssociate
page 3-171

BusComp_PreCopyRecord
page 3-172
BusComp_PreDeleteRecord
page 3-173
BusComp_PreGetFieldValue
page 3-175

Version 6.0

Siebel Object Interfaces Reference

A-11

Siebel VB Quick Reference


Business Component

Table A-6.

Business Component Events Summary

(Sheet 2 of 2)

Event

Description

Syntax

BusComp_PreInvokeMethod

Called before a specialized


method is invoked on a
business component.

BusComp_PreInvokeMethod(methodName as String,
Arguments as String or StringArray)

Called before a new row is


created in the business
component.

BusComp_PreNewRecord

Called before query


execution.

BusComp_PreQuery

Called when a value is


pushed down into the
business component from
the user interface.

BusComp_PreSetFieldValue(FieldName as
String,FieldValue as String)

Called before a row is


written out to the database.

BusComp_PreWriteRecord

Called after the query is


complete and all rows have
been retrieved, but before
they have been displayed.

BusComp_Query

Called after a value has


been pushed down into the
business component from
the user interface.

BusComp_SetFieldValue(fieldName as String)

Called after a row is written


to the database.

BusComp_WriteRecord

page 3-176
BusComp_PreNewRecord
page 3-177
BusComp_PreQuery
page 3-178
BusComp_PreSetFieldValue
page 3-179

BusComp_PreWriteRecord
page 3-181
BusComp_Query
page 3-182

BusComp_SetFieldValue
page 3-184

BusComp_WriteRecord
page 3-185

A-12

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Business Object

Business Object
Table A-7.

Business Object Methods Syntax Summary

Method

Description

Syntax

GetBusComp

Function that returns the


specified business
component.

Dim oBusObject as BusObject


Dim oBusComp as BusComp
set oBusComp = BusObject.GetBusComp(BusCompName as String)

Function that returns the


name of the control.

Dim oBusObject as BusObject


Dim sName as String
sName = oBusObject.Name

page 3-186
Name
page 3-189

Business Service
Table A-8.

Business Service Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

GetFirstProperty

Retrieves the name


of the first property
of a business
service.

Dim oService as Service


Dim sName as String
sName = oService.GetFirstProperty()

Once the name of


the first property
has been retrieved,
retrieves the name
of the next property
of a business
service.

Dim oService as Service


Dim sName as String
sName = oService.GetNextProperty()

Retrieves the value


stored in the
specified property.

Dim oService as Service


Dim sValue as String
sValue = oService.GetProperty(propName as String)

Calls a specialized
method or a usercreated method on
the business
service.

Dim oService as Service


Dim Return
Return = oService.InvokeMethod(methodName as String,
InputArguments as PropertySet, OutputArguments as PropertySet)

Returns the name


of the business
service.

Dim oService as Service


Dim sName as String
sName = oService.Name

page 3-211

GetNextProperty
page 3-191

GetProperty
page 3-192
InvokeMethod
page 3-193

Name
page 3-195

Version 6.0

Siebel Object Interfaces Reference

A-13

Siebel VB Quick Reference


Business Service

Table A-8.

Business Service Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

PropertyExists

Returns a Boolean
value indicating
whether the
property specified
in the argument
exists.

Dim oService as Service


oService.PropertyExists(propName as String)

Removes a
property from a
business service.

Dim oService as Service


oService.RemoveProperty propName as String

Assigns a value to a
property of a
business service.

Dim oService as Service


oService.SetProperty propName as String, propValue as String

page 3-196

RemoveProperty
page 3-197
SetProperty
page 3-198

Table A-9.

Business Service Events Syntax Summary

Method

Description

Syntax

Service_InvokeMethod

Called when
a business
service is
accessed.

Service_InvokeMethod(methodName as String)

Called before
a specialized
method is
invoked on a
business
service.

Service_PreInvokeMethod(methodName as
String, Inputs as PropertySet, Outputs as
PropertySet)

page 3-199

Service_PreInvokeMethod
page 3-200

A-14

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Property Set

Property Set
Table A-10.

Property Set Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

AddChild

Adds subsidiary
property sets to a
property set.

Dim oPropSet as PropertySet


Dim iIndex as Integer
oPropSet.AddChild(childObject as String)

Returns a copy of a
property set.

Dim oPropSet1 as PropertySet


Dim oPropSet2 as PropertySet
oPropSet2 = oPropSet1.Copy()

Returns a specified
child property set of
a property set.

Dim oPropSet as PropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetChild(index as Integer)

Returns the number


of child property
sets attached to a
parent property set.

Dim oPropSet as PropertySet


Dim iCount as Integer
iCount = oPropSet.GetChildCount()

Returns the name of


the first property in
a property set.

Dim oPropSet as PropertySet


Dim sPropName as String
sPropName = oPropSet.GetFirstProperty()

Returns the name of


the next property in
a property set.

Dim oPropSet as PropertySet


Dim sPropName as String
sPropName = oPropSet.GetNextProperty()

Returns the value of


a property when
given the property
name.

Dim oPropSet as PropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetProperty(propName as String)

Returns the value


stored in a type in a
property set.

Dim oPropSet as PropertySet


Dim sTypeVal as String
sTypeVal = oPropSet.GetType(value as String)

Returns a value
stored as part of a
property set.

Dim oPropSet as PropertySet


Dim sValVal as String
sValVal = oPropSet.GetValue(value as String)

Inserts a child
property set into a
parent property set
at a specific
location.

Dim oPropSet as PropertySet


oPropSet.InsertChildAt childObject as String, index as Integer

page 3-204
Copy
page 3-206
GetChild
page 3-208
GetChildCount
page 3-210

GetFirstProperty
page 3-211
GetNextProperty
page 3-212
GetProperty
page 3-213

GetType
page 3-214
GetValue
page 3-215
InsertChildAt
page 3-216

Version 6.0

Siebel Object Interfaces Reference

A-15

Siebel VB Quick Reference


Property Set

Table A-10.

Property Set Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

PropertyExists

Returns a Boolean
value indicating
whether the
property specified in
the argument exists.

Dim oPropSet as Property Set


oPropSet.PropertyExists(propName as String)

Removes a child
property set as a
specified index from
a parent property
set.

Dim oPropSet as PropertySet


oPropSet.RemoveChild index as Integer

Removes the
property specified in
its argument from a
property set.

Dim oPropSet as PropertySet


oPropSet.RemoveProperty propName as String

Removes all
properties and child
property sets from a
property set.

Dim oPropSet as PropertySet


oPropSet.Reset()

Assigns a value to
the property of a
property set
specified in its
argument.

Dim oPropSet as PropertySet


oPropSet.SetProperty propName as String, propValue as String

Assigns a data value


to a type member of
a property set.

Dim oPropSet as PropertySet


oPropSet.SetType value as String

Assigns a data value


to a value member
of a property set.

Dim oPropSet as PropertySet


oPropSet.SetValue value as String

page 3-217

RemoveChild
page 3-218

RemoveProperty
page 3-219

Reset
page 3-220

SetProperty
page 3-221

SetType
page 3-222
SetValue
page 3-223

A-16

Siebel Object Interfaces Reference

Version 6.0

Siebel VB Quick Reference


Control

Control
Table A-11.

Control Methods Syntax Summary

Method

Description

Syntax

Applet

Function that returns the


parent applet for the
control.

Dim control as Control


Dim oApplet as Applet
Set oApplet = control.Applet

Function that returns the


corresponding business
component for the control.

Dim control as Control


Dim oBusComp as BusComp
Set oBusComp = control.BusComp

Function that returns the


corresponding business
object for the control.

Dim control as Control


Dim oBusObject as BusObject
Set oBusObject = control.BusObject

Function that returns the


value of a control property.

Dim control as Control


control.GetProperty(propName as String)

Function that returns the


value of the control.

Dim control as Control


Dim sValue as String
sValue = control.GetValue

Function that returns the


name of the object.

Dim control as Control


Dim sName as String
sName = control.Name

Sets visual properties of a


control.

Dim control as Control


control.SetProperty(propName as String, propValue as String)

Sets the contents of the


control to the indicated
value.

Dim control as Control


control.SetValue(controlValue as String)

page 3-224
BusComp
page 3-225
BusObject
page 3-226
GetProperty
page 3-227
GetValue
page 3-229
Name
page 3-230
SetProperty
page 3-231
SetValue
page 3-233

Version 6.0

Siebel Object Interfaces Reference

A-17

Siebel VB Quick Reference


Miscellaneous Interfaces and Events

Miscellaneous Interfaces and Events


Table A-12.

Miscellaneous Methods Syntax Summary

Method

Description

Syntax

theApplication

Global method that returns


the unique object of type Application.

TheApplication.Application_method

page 3-249

Table A-13.

Miscellaneous Event Summary

Method

Description

Syntax

ControlName_Click

Called when the user clicks a push-button control.

Control_Name_Click

page 3-247

A-18

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference

Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-11
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-13

Version 6.0

Siebel Object Interfaces Reference

B-1

COM Automation Server Quick Reference


Applet

Applet
Table B-1.

Applet Methods Syntax Summary

Method

Description

Syntax

ActiveControl

Returns the control that


currently has the input
focus within the applet.

Dim applet as SiebelApplet


Dim control as SiebelControl
Set control as applet.ActiveControl(ErrCode as Integer)

Returns the business


component that is
associated with the
applet.

Dim applet as SiebelApplet


Dim busComp as SiebelBusComp
Set busComp = applet.BusComp(ErrCode as Integer)

Returns the business


object for the business
component for the applet.

Dim applet as Applet


Dim busObject as SiebelBusObject
Set busObject = applet.BusObject(ErrCode as Integer)

Navigates to the view that


corresponds to the
drilldown object whose
name is specified in the
argument.

Dim applet as SiebelApplet


applet.Drilldown(drilldown_object as String, ErrCode as
Integer)

Returns the ActiveX


control whose name is
specified in the argument.

Dim applet as SiebelApplet


Dim control as SiebelControl
Set control = applet.FindActiveXControl(controlName as
String, ErrCode as Integer)

Returns the control


whose name is specified
in the argument.

Dim applet as SiebelApplet


Dim control as SiebelControl
Set control = applet.FindControl(controlName as String,
ErrCode as Integer)

Navigates to the control


whose name is specified
in the argument.

Dim applet as SiebelApplet


applet = applet.Gotcontrol(controlObj as Control,
ErrCode as Integer)

Calls a specialized
method whose name is
specified in the argument.

Dim applet as SiebelApplet


applet.InvokeMethod(methodName as String ,methodArgs as
String or StringArray, ErrCode as Integer)

Returns the name of the


applet.

Dim applet as SiebelApplet


Dim sApplet as String
sApplet = applet.Name(ErrCode as Integer)

Posts the changes made


to the applet.

Dim applet as SiebelApplet


Dim bReturn as Boolean
bReturn = applet.PostChanges(ErrCode as Integer)

page 3-25
BusComp
page 3-26

BusObject
page 3-28
Drilldown
page 3-29

FindActiveXControl
page 3-31

FindControl
page 3-32

GotoControl
page 3-33
InvokeMethod
page 3-34
Name
page 3-36
PostChanges
page 3-37

B-2

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference


Application

Application
Table B-2.

Application Methods Syntax Summary

(Sheet 1 of 3)

Method

Description

Syntax

ActiveApplet

Returns the applet


that has the input
focus.

Dim application as SiebelApplication


Dim applet as SiebelApplet
Set applet = application.ActiveApplet(ErrCode as Integer)

Returns the business


component
associated with the
active applet.

Dim application as SiebelApplication


Dim busComp as SiebelBusComp
Set busComp = application.ActiveBusComp(ErrCode as Integer)

Returns the business


object for the
business component
for the active applet.

Dim application as SiebelApplication


Dim busObject as SiebelBusObject
Set busObject = application.ActiveBusObject(ErrCode as
Integer)

Returns the control


that has the input
focus.

Dim application as SiebelApplication


Dim control as SiebelControl
Set control = application.ActiveControl(ErrCode as Integer)

Returns the name of


the active view.

Dim application as SiebelApplication


Dim sView as String
sView = application.ActiveViewName(ErrCode as Integer)

Returns the threeletter operating


currency code.

Dim application as SiebelApplication


Dim sCur as String
sCur = Application.CurrencyCode(ErrCode as Integer)

Returns the applet


object identified in
the argument.

Dim application as SiebelApplication


Dim applet as SiebelApplet
set applet = application.FindApplet(appletName as String,
ErrCode as Integer)

Instantiates and
returns a new
instance of the
business object
specified in the
argument.

Dim application as SiebelApplication


Dim busObject as SiebelBusObject
set busObject = application.GetBusObject(busobjName as String,
ErrCode as Integer)

Returns the last


error text message.

Dim application as SiebelApplication


Dim sText as String
sText = application.GetLastErrText(ErrCode as Integer)

Gets the shared


user-defined global
variables.

Dim application as SiebelApplication


Dim sName as String
sName = application.GetSharedGlobal(varName as String, ErrCode
as Integer)

page 3-48
ActiveBusComp
page 3-49

ActiveBusObject
page 3-50

ActiveControl
page 3-51
ActiveViewName
page 3-53
CurrencyCode
page 3-54
FindApplet
page 3-56

GetBusObject
page 3-57

GetLastErrText
page 3-59
GetLastErrCode
page 3-58

Version 6.0

Siebel Object Interfaces Reference

B-3

COM Automation Server Quick Reference


Application

Table B-2.

Application Methods Syntax Summary

(Sheet 2 of 3)

Method

Description

Syntax

GetProfileAttr

Returns the value of


an attribute in a user
profile.

Dim application as SiebelApplication


Dim sAttr as String
SAttr = application.4GetProfileAttr(name as String, ErrCode as
Integer)

Instantiates and
returns a new
instance of the
argument-specified
service.

Dim application as SiebelApplication


Dim oService as SiebelService
set oService = oApplication.GetService(serviceName as String,
ErrCode as Integer)

Sets the focus to the


specified applet.

Dim application as SiebelApplication


application.GotoApplet(appletObj as Applet, ErrCode as
Integer)

Activates the named


view and its
business object.

Dim application as SiebelApplication


application.GotoView(viewName as String, [BusinessObjectName
as string], ErrCode as Integer)

Calls the named


specialized method.

Dim application as SiebelApplication


Dim sReturn as String
sReturn = application.InvokeMethod(methodName as String,
methodArgs as String or StringArray, ErrCode as Integer)

Allows external
applications to log in
to the COM Data
Server.

Dim application as SiebelApplication


Dim sErr as String
sErr = application.Login(userName as String, password as
String, ErrCode as Integer)

Returns the login ID


of the user who
started the Siebel
application.

Dim application as SiebelApplication


Dim sID as string
sID = application.LoginId(ErrCode as Integer)

Returns the login


name of the user
who started the
Siebel application.

Dim application as SiebelApplication


Dim sUser as String
sUser = application.LoginName(ErrCode as Integer)

Constructs a new
property set object.

Dim application as SiebelApplication


Dim propset As PropertySet
propset = application.NewPropertySet(ErrCode as Integer)

Returns the position


ID that describes the
users current
position.

Dim application as SiebelApplication


Dim sRow as String
sRow = application.PositionId(ErrCode as Integer)

page 3-60

GetService
page 3-61

GotoApplet
page 3-63
GotoView
page 3-64
InvokeMethod
page 3-68

Login
page 3-70

LoginId
page 3-72

LoginName
page 3-73

NewPropertySet
page 3-78
PositionId
page 3-79

B-4

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference


Application

Table B-2.

Application Methods Syntax Summary

(Sheet 3 of 3)

Method

Description

Syntax

PositionName

Returns the position


name of the users
current position.

Dim application as SiebelApplication


Dim sPosition as String
sPosition = application.PositionName(ErrCode as Integer)

Used in
personalization to
assign values to
attributes in a user
profile.

Dim oApplication as SiebelApplication


oApplication.SetProfileAttr(name as String, value as String,
ErrCode as Integer)

Sets a shared userdefined global


variable.

Dim application as SiebelApplication


application.SetSharedGlobal(varName as String, value as
String, ErrCode as Integer)

Displays a message
in the status bar.

Dim application as SiebelApplication


application.ShowStatus(message as String, ErrCode as Integer)

Appends a message
to the trace file.

Dim application as SiebelApplication


application.Trace(message as String, ErrCode as Integer)

Turns off the tracing


started by TraceOn.

Dim application as SiebelApplication


application.TraceOff(ErrCode as Integer)

Turns tracing on.

Dim application as SiebelApplication


application.TraceOn(filename as String, type as Integer,
Selection as Integer, ErrCode as Integer)

page 3-80
SetProfileAttr
page 3-83

SetSharedGlobal
page 3-82
ShowStatus
page 3-84
Trace
page 3-85
TraceOff
page 3-87
TraceOn
page 3-88

Version 6.0

Siebel Object Interfaces Reference

B-5

COM Automation Server Quick Reference


Business Component

Business Component
Table B-3.

Business Component Methods Syntax Summary

(Sheet 1 of 4)

Method

Description

Syntax

ActivateField

Allows queries to
retrieve data for the
specified field.

Dim busComp as SiebelBusComp


BusComp.ActivateField(fieldName as String, ErrCode as
Integer)

Creates a new manyto-many relationship


for the parent object
through an association
business component.

Dim busComp as SiebelBusComp


busComp.Associate(whereIndicator as Integer, ErrCode
as Integer)

Returns the business


object that contains
the business
component.

Dim busComp as SiebelBusComp


Dim busObject as BusObject
Set busObject = busComp.BusObject(ErrCode as Integer)

Clears the current


query and sort
specifications on the
business component.

Dim busComp as SiebelBusComp


busComp.ClearToQuery(ErrCode as Integer)

Deactivates all
currently activated
fields.

Dim busComp as SiebelBusComp


busComp.DeactivateFields(ErrCode as Integer)

Removes the current


record from the
business component.

Dim busComp as SiebelBusComp


busComp.DeleteRecord(ErrCode as Integer)

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery(cursorMode as Boolean, ErrCode as
Integer)

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery2(cursorMode as Boolean,
ignoreMaxCursorSize as Boolean, ErrCode as Integer)

Moves to the first


record in the business
component.

Dim busComp as SiebelBusComp


Dim bIsRecord as Boolean
bIsRecord = busComp.FirstRecord(ErrCode as Integer)

Moves to the first


record of the multiple
selection in the
business component.

Dim busComp as SiebelBusComp


Dim iIsMultipleSelection as Integer
iIsMultipleSelection = busComp.FirstSelected(ErrCode
as Integer)

page 3-98
Associate
page 3-101

BusObject
page 3-103

ClearToQuery
page 3-104

DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111
FirstSelected
page 3-112

B-6

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference


Business Component

Table B-3.

Business Component Methods Syntax Summary

(Sheet 2 of 4)

Method

Description

Syntax

GetAssocBusComp

Returns the association


business component.

Dim busComp as SiebelBusComp


Dim AssocBusComp as BusComp
Set AssocBusComp = busComp.GetAssocBusComp(ErrCode as
Integer)

Returns a value for the


field specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFieldValue(FieldName as String,
ErrCode as Integer)

Returns a formatted
value for the field
specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFormattedFieldValue(FieldName as
String, ErrCode as Integer)

Returns the last error


text message.

Dim busComp as SiebelBusComp


Dim sErr as String
sErr = busComp.GetLastErrText(ErrCode as Integer)

Returns the MVG


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim mVGBusComp as SiebelBusComp
set mVGBusComp = busComp.GetMVGBusComp(FieldName as
String, ErrCode as Integer)

Returns the argumentnamed search


specification.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetNamedSearch(SearchName as String,
ErrCode as Integer)

Returns the pick


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim pickBusComp as SiebelBusComp
Set pickBusComp = busComp.GetPicklistBusComp(FieldName
as String, ErrCode as Integer)

Returns the current


search expression.

Dim busComp as SiebelBusComp


Dim sExpr as String
sExpr = busComp.GetSearchExpr(ErrCode as Integer)

Returns the current


search specification for
the field specified in
the argument.

Dim busComp as SiebelBusComp


Dim sSpec as String
sSpec = busComp.GetSearchSpec(FieldName as String,
ErrCode as Integer)

Returns the value for


the property name
specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetUserProperty(propertyName as
String, ErrCode as Integer)

page 3-113

GetFieldValue
page 3-115

GetFormattedFieldValue
page 3-117

GetLastErrText
page 3-120
GetMVGBusComp
page 3-121

GetNamedSearch
page 3-123

GetPicklistBusComp
page 3-124

GetSearchExpr
page 3-126
GetSearchSpec
page 3-127

GetUserProperty
page 3-128

Version 6.0

Siebel Object Interfaces Reference

B-7

COM Automation Server Quick Reference


Business Component

Table B-3.

Business Component Methods Syntax Summary

(Sheet 3 of 4)

Method

Description

Syntax

GetViewMode

Returns the visibility


mode for the business
component.

Dim busComp as SiebelBusComp


Dim iMode as Integer
iMode = busComp.GetViewMode(ErrCode as Integer)

Calls the specialized


method named in the
argument.

Dim busComp as SiebelBusComp


Dim sReturn as String
sReturn = busComp.InvokeMethod(methodName as String or
StringArray, methodArgs as String, ErrCode as Integer)

Moves to the last


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.LastRecord(ErrCode as Integer)

Returns the name of


the business
component.

Dim busComp as SiebelBusComp


Dim sName as String
sName = busComp.Name(ErrCode as Integer)

Adds a new record to


the business
component.

Dim busComp as SiebelBusComp


busComp.NewRecord(whereIndicator as Integer, ErrCode
as Integer)

Moves to the next


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.NextRecord(ErrCode as Integer)

Moves to the next


record of the current
multiple selection.

Dim busComp as SiebelBusComp


Dim iReturn as Integer
bReturn = busComp.NextSelected(ErrCode as integer)

Returns the parent


business component.

Dim busComp as SiebelBusComp


Dim parentBusComp as SiebelBusComp
Set parentBusComp = busComp.ParentBusComp(ErrCode as
Integer)

Places the currently


selected record in a
picklist business
component into the
appropriate fields of
the parent business
component.

Dim busComp as SiebelBusComp


busComp.Pick(ErrCode as Integer)

Moves to the previous


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.PreviousRecord(ErrCode as Integer)

Refines a query after a


query has been
executed.

Dim busComp as SiebelBusComp


busComp.RefineQuery(ErrCode as Integer)

page 3-129
InvokeMethod
page 3-130

LastRecord
page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
NextSelected
page 3-137
ParentBusComp
page 3-138

Pick
page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142

B-8

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference


Business Component

Table B-3.

Business Component Methods Syntax Summary

(Sheet 4 of 4)

Method

Description

Syntax

SetFieldValue

Assigns a new value to


the named field for the
current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFieldValue(FieldName as String, FieldValue
as String, ErrCode as Integer)

Accepts the field value


in the current local
format and assigns the
new value to the
named field for the
current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFormattedFieldValue(FieldName as String,
FieldValue as String, ErrCode as Integer)

Sets a named search


specification on the
business component.

Dim busComp as SiebelBusComp


busComp.SetNamedSearch(searchName as String,
searchSpec as String, ErrCode as Integer)

Sets the search


specification for the
business component.

Dim busComp as SiebelBusComp


busComp.SetSearchExpr(searchSpec as String, ErrCode as
Integer)

Sets the search


specification for the
specified field.

Dim busComp as SiebelBusComp


busComp.SetSearchSpec(FieldName as String, searchSpec
as String, ErrCode as Integer)

Sets the sort


specification for a
query.

Dim busComp as SiebelBusComp


busComp.SetSortSpec(sortSpec as String, ErrCode as
Integer)

Sets the value of the


specified User
Property.

Dim busComp as SiebelBusComp


busComp.SetUserProperty(propertyName as String,
newValue as String, ErrCode as Integer)

Disables the updates to


the user interface that
result from changes to
the business
component.

Dim busComp as SiebelBusComp


busComp.SuppressNotification(ErrCode as Integer)

Deletes an active
record created by
NewRecord.

Dim busComp as SiebelBusComp


busComp.UndoRecord(ErrCode as Integer)

Commits to the
database any changes
made to the current
record.

Dim busComp as SiebelBusComp


busComp.WriteRecord(ErrCode as Integer)

page 3-143

SetFormattedFieldValue
page 3-145

SetNamedSearch
page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SetUserProperty
page 3-156
SuppressNotification
page 3-159

UndoRecord
page 3-160
WriteRecord
page 3-161

Version 6.0

Siebel Object Interfaces Reference

B-9

COM Automation Server Quick Reference


Business Object

Business Object
Table B-4.

Business Object Methods Syntax Summary

Method

Description

Syntax

GetBusComp

Returns the
specified
business
component.

Dim busObject as SiebelBusObject


Dim busComp as SiebelBusComp
set busComp = busObject.GetBusComp(BusCompName as String, ErrCode as
Integer)

Returns the
name of the
business object.

Dim busObject as SiebelBusObject


Dim sName as String
sName = busObject.Name(ErrCode as Integer)

page 3-186

Name
page 3-189

Business Service
Table B-5.

Business Service Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

GetFirstProperty

Retrieves the name of the


first property of a
business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetFirstProperty(ErrCode as Integer)

Once the name of the


first property has been
retrieved, retrieves the
name of the next
property of a business
service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetNextProperty(ErrCode as Integer)

Retrieves the value


stored in the specified
property.

Dim oService as SiebelService


Dim sValue as String
sValue = oService.GetProperty(propName as String, ErrCode
as Integer)

Calls a specialized
method or a user-created
method on the business
service.

Dim oService as SiebelService


Dim Return
Return = oService.InvokeMethod(methodName as String,
InputArguments as SiebelPropertySet, OutputArguments as
SiebelPropertySet, ErrCode as Integer)

Returns the name of the


business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.Name(ErrCode as Integer)

page 3-211
GetNextProperty
page 3-191

GetProperty
page 3-192

InvokeMethod
page 3-193

Name
page 3-195

B-10

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference


Property Set

Table B-5.

Business Service Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

PropertyExists

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oService as SiebelService


oService.PropertyExists(propName as String, ErrCode as
Integer)

Removes a property from


a business service.

Dim oService as SiebelService


oService.RemoveProperty(propName as String, ErrCode as
Integer)

Assigns a value to a
property of a business
service.

Dim oService as SiebelService


oService.SetProperty(propName as String, propValue as
String, ErrCode as Integer)

page 3-217

RemoveProperty
page 3-197
SetProperty
page 3-198

Property Set
Table B-6.

Property Set Methods Syntax Summary

(Sheet 1 of 3)

Method

Description

Syntax

AddChild

Adds subsidiary property


sets to a property set.

Dim oPropSet as SiebelPropertySet


Dim iIndex as Integer
oPropSet.AddChild(childObject as String, ErrCode as
Integer)

Returns a copy of a
property set.

Dim oPropSet1 as SiebelPropertySet


Dim oPropSet2 as SiebelPropertySet
oPropSet2 = oPropSet1.Copy(ErrCode as Integer, ErrCode as
Integer)

Returns a specified child


property set of a property
set.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetChild(index as Integer, ErrCode as
Integer)

Returns the number of


child property sets
attached to a parent
property set.

Dim oPropSet as SiebelPropertySet


Dim iCount as Integer
iCount = oPropSet.GetChildCount(ErrCode as Integer)

Returns the name of the


first property in a
property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetFirstProperty(ErrCode as Integer)

page 3-204

Copy
page 3-206

GetChild
page 3-208

GetChildCount
page 3-210

GetFirstProperty
page 3-211

Version 6.0

Siebel Object Interfaces Reference

B-11

COM Automation Server Quick Reference


Property Set

Table B-6.

Property Set Methods Syntax Summary

(Sheet 2 of 3)

Method

Description

Syntax

GetNextProperty

Returns the name of the


next property in a
property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetNextProperty(ErrCode as Integer)

Returns the value of a


property when given the
property name.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetProperty(propName as String,
ErrCode as Integer)

Returns the value stored


in a type in a property set.

Dim oPropSet as SiebelPropertySet


Dim sTypeVal as String
sTypeVal = oPropSet.GetType(value as String, ErrCode as
Integer)

Returns a value stored as


part of a property set.

Dim oPropSet as SiebelPropertySet


Dim sValVal as String
sValVal = oPropSet.GetValue(value as String, ErrCode as
Integer)

Inserts a child property


set into a parent property
set at a specific location.

Dim oPropSet as SiebelPropertySet


oPropSet.InsertChildAt(childObject as String, index as
Integer, ErrCode as Integer)

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oPropSet as Property Set


oPropSet.PropertyExists(propName as String, ErrCode as
Integer)

Removes a child property


set as a specified index
from a parent property
set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveChild(index as Integer, ErrCode as Integer)

Removes the property


specified in its argument
from a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveProperty(propName as String, ErrCode as
Integer)

Removes all properties


and child property sets
from a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.Reset(ErrCode as Integer)

Assigns a value to the


property of a property set
specified in its argument.

Dim oPropSet as SiebelPropertySet


oPropSet.SetProperty(propName as String, propValue as
String, ErrCode as Integer)

page 3-212
GetProperty
page 3-213

GetType
page 3-214

GetValue
page 3-215

InsertChildAt
page 3-216
PropertyExists
page 3-217

RemoveChild
page 3-218

RemoveProperty
page 3-219
Reset
page 3-220
SetProperty
page 3-221

B-12

Siebel Object Interfaces Reference

Version 6.0

COM Automation Server Quick Reference


Control

Table B-6.

Property Set Methods Syntax Summary

(Sheet 3 of 3)

Method

Description

Syntax

SetType

Assigns a data value to a


type member of a
property set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetType(value as String, ErrCode as Integer)

Assigns a data value to a


value member of a
property set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetValue(value as String, ErrCode as Integer)

page 3-222

SetValue
page 3-223

Control
Table B-7.

Control Methods Syntax Summary

Method

Description

Syntax

Applet

Returns the parent applet for


the control.

Dim control as SiebelControl


Dim applet as SiebelApplet
Set applet = control.Applet(ErrCode as Integer)

Returns the corresponding


business component for the
control.

Dim control as SiebelControl


Dim busComp as SiebelBusComp
Set busComp = control.BusComp(ErrCode as Integer)

Returns the corresponding


business object for the
control.

Dim control as SiebelControl


Dim busObject as SiebelBusObject
Set applet = control.BusObject(ErrCode as Integer)

Function that returns the


value of a control property.

Dim control as Control


control.GetProperty(propName as String, ErrCode as Integer)

Returns the value of the


control.

Dim control as SiebelControl


Dim sValue as String
sValue = control.GetValue(ErrCode as Integer)

Returns the name of the


object.

Dim control as SiebelControl


Dim sName as String
sName = control.Name(ErrCode as Integer)

Sets visual properties of a


control.

Dim control as Control


control.SetProperty(propName as String, propValue as String,
ErrCode As Integer)

Sets the contents of the


control to the indicated
value.

Dim control as SiebelControl


control.SetValue(controlValue as String, ErrCode as Integer

page 3-224
BusComp
page 3-225
BusObject
page 3-226
GetProperty
page 3-227
GetValue
page 3-229
Name
page 3-230
SetProperty
page 3-231
SetValue
page 3-233

Version 6.0

Siebel Object Interfaces Reference

B-13

COM Automation Server Quick Reference


Control

B-14

Siebel Object Interfaces Reference

Version 6.0

COM Data Server Quick Reference

Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-4
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-8
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-8
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-9

Version 6.0

Siebel Object Interfaces Reference

C-1

COM Data Server Quick Reference


Application

Application
Table C-1.

Application Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

CurrencyCode

Returns the three-letter


operating currency code.

Dim application as SiebelApplication


Dim sCur as String
sCur = Application.CurrencyCode(ErrCode as Integer)

Instantiates and returns a


new instance of the
business object specified
in the argument.

Dim application as SiebelApplication


Dim busObject as SiebelBusObject
set busObject = application.GetBusObject(busobjName as
String, ErrCode as Integer)

Returns the last error text


message.

Dim application as SiebelApplication


Dim sText as String
sText = application.GetLastErrText(ErrCode as Integer)

Returns the value of an


attribute in a user profile.

Dim application as SiebelApplication


Dim sAttr as String
SAttr = application.GetProfileAttr(name as String, ErrCode
as Integer)

Instantiates and returns a


new instance of the
argument specified
service.

Dim Application as SiebelApplication


Dim Service as SiebelService
set Service = Application.GetService(serviceName as
String, ErrCode as Integer)

Gets the shared user


defined global variables.

Dim application as SiebelApplication


Dim sName as String
sName = application.GetSharedGlobal(varName as String,
ErrCode as Integer)

Calls the named


specialized method.

Dim application as SiebelApplication


Dim sReturn as String
sReturn = application.InvokeMethod(methodName as String,
methodArgs as String or StringArray, ErrCode as Integer)

Starts the COM Data


Server object and returns
a reference to the
Application object.

Dim application as SiebelApplication


Dim returned as SiebelApplication
set returned =
application.LoadObjects(pathName\cfgFileName as String,
ErrCode as Integer)

Allows external
applications to log in to
the COM Data Server.

Dim application as SiebelApplication


Dim sErr as String
sErr = application.Login(userName as String, password as
String, ErrCode as Integer)

Returns the login ID of


the user who started the
Siebel application.

Dim application as SiebelApplication


Dim sID as String
sID = application.LoginId(ErrCode as Integer)

page 3-54
GetBusObject
page 3-57

GetLastErrText
page 3-59
GetProfileAttr
page 3-60

GetService
page 3-61

GetSharedGlobal
page 3-62

InvokeMethod
page 3-68

LoadObjects
page 3-69

Login
page 3-70

LoginId
page 3-72

C- 2

Siebel Object Interfaces Reference

Version 6.0

COM Data Server Quick Reference


Application

Table C-1.

Application Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

LoginName

Returns the login name of


the user who started the
Siebel application.

Dim application as SiebelApplication


Dim sUser as String
sUser = application.LoginName(ErrCode as Integer)

Constructs and returns a


new property set object.

Dim oApplication as SiebelApplication


Dim oPropSet as ProperySet
oPropSet = oApplication.NewPropertySet()

Returns the position ID


that describes the users
current position.

Dim application as SiebelApplication


Dim sRow as String
sRow = application.PositionId(ErrCode as Integer)

Returns the position


name of the users
current position.

Dim application as SiebelApplication


Dim sPosition as String
sPosition = application.PositionName(ErrCode as Integer)

Used in personalization
to assign values to
attributes in a user
profile.

Dim application as SiebelApplication


application.SetProfileAttr(name as String, value as
String, ErrCode as Integer)

Sets a shared userdefined global variable.

Dim application as SiebelApplication


application.SetSharedGlobal(varName as String, value as
String, ErrCode as Integer)

Appends a message to the


trace file.

Dim application as SiebelApplication


application.Trace(message as String, ErrCode as Integer)

Turns off the tracing


started by TraceOn.

Dim application as SiebelApplication


application.TraceOff(ErrCode as Integer)

Turns tracing on.

Dim application as SiebelApplication


application.TraceOn(filename as String, type as Integer,
Selection as Integer, ErrCode as Integer)

page 3-73
NewPropertySet
page 3-78
PositionId
page 3-79
PositionName
page 3-80
SetProfileAttr
page 3-83

SetSharedGlobal
page 3-82
Trace
page 3-85
TraceOff
page 3-87
TraceOn
page 3-88

Version 6.0

Siebel Object Interfaces Reference

C-3

COM Data Server Quick Reference


Business Component

Business Component
Table C-2.

Business Component Methods Syntax Summary

(Sheet 1 of 4)

Method

Description

Syntax

ActivateField

Allows queries to
retrieve data for the
specified field.

Dim busComp as SiebelBusComp


busComp.ActivateField(fieldName as String, ErrCode as
Integer)

Creates a new manyto-many relationship


for the parent object
through an
association business
component.

Dim busComp as SiebelBusComp


busComp.Associate(whereIndicator as Integer, ErrCode as
Integer)

Returns the business


object that contains
the business
component.

Dim busComp as SiebelBusComp


Dim busObject as BusObject
Set busObject = busComp.BusObject(ErrCode as Integer)

Clears the current


query and sort
specifications on the
business component.

Dim busComp as SiebelBusComp


busComp.ClearToQuery(ErrCode as Integer)

Deactivates all
currently activated
fields.

Dim busComp as SiebelBusComp


busComp.DeactivateFields(ErrCode as Integer)

Removes the current


record from the
business component.

Dim busComp as SiebelBusComp


busComp.DeleteRecord(ErrCode as Integer)

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery(cursorMode as Boolean, ErrCode as
Integer)

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery2(cursorMode as Boolean,
ignoreMaxCursorSize as Boolean, ErrCode as Integer)

Moves to the first


record in the business
component.

Dim busComp as SiebelBusComp


Dim bIsRecord as Boolean
bIsRecord = busComp.FirstRecord(ErrCode as Integer)

Returns the
association business
component.

Dim busComp as SiebelBusComp


Dim AssocBusComp as BusComp
Set AssocBusComp = busComp.GetAssocBusComp(ErrCode as
Integer)

page 3-98
Associate
page 3-101

BusObject
page 3-103

ClearToQuery
page 3-104

DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111
GetAssocBusComp
page 3-113

C- 4

Siebel Object Interfaces Reference

Version 6.0

COM Data Server Quick Reference


Business Component

Table C-2.

Business Component Methods Syntax Summary

(Sheet 2 of 4)

Method

Description

Syntax

GetFieldValue

Returns a value for


the field specified in
the argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFieldValue(FieldName as String,
ErrCode as Integer)

Returns a formatted
value for the field
specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFormattedFieldValue(FieldName as
String, ErrCode as Integer)

Returns the last error


text message.

Dim busComp as SiebelBusComp


Dim sErr as String
sErr = busComp.GetLastErrText(ErrCode as Integer)

Returns the MVG


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim mVGBusComp as SiebelBusComp
set mVGBusComp = busComp.GetMVGBusComp(FieldName as
String, ErrCode as Integer)

Returns the
argument-named
search specification.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetNamedSearch(SearchName as String,
ErrCode as Integer)

Returns the pick


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim pickBusComp as SiebelBusComp
Set pickBusComp = busComp.GetPicklistBusComp(FieldName
as String, ErrCode as Integer)

Returns the current


search expression.

Dim busComp as SiebelBusComp


Dim sExpr as String
sExpr = busComp.GetSearchExpr(ErrCode as Integer)

Returns the current


search specification
for the field specified
in the argument.

Dim busComp as BusComp


Dim sSpec as String
sSpec = busComp.GetSearchSpec(FieldName as String,
ErrCode as Integer)

Returns the value for


the property name
whose name is
specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetUserProperty(propertyName as
String, ErrCode as Integer)

Returns the visibility


mode for the business
component.

Dim busComp as SiebelBusComp


Dim iMode as Integer
iMode = busComp.GetViewMode(ErrCode as Integer)

page 3-115

GetFormattedFieldValue
page 3-117

GetLastErrText
page 3-120
GetMVGBusComp
page 3-121

GetNamedSearch
page 3-123

GetPicklistBusComp
page 3-124

GetSearchExpr
page 3-126
GetSearchSpec
page 3-127

GetUserProperty
page 3-128

GetViewMode
page 3-129

Version 6.0

Siebel Object Interfaces Reference

C-5

COM Data Server Quick Reference


Business Component

Table C-2.

Business Component Methods Syntax Summary

(Sheet 3 of 4)

Method

Description

Syntax

InvokeMethod

Calls the specialized


method named in the
argument.

Dim busComp as SiebelBusComp


Dim sReturn as String
sReturn = busComp.InvokeMethod(methodName as String,
methodArgs as String or StringArray, ErrCode as Integer)

Moves to the last


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.LastRecord(ErrCode as Integer)

Returns the name of


the business
component.

Dim busComp as SiebelBusComp


Dim sName as String
sName = busComp.Name(ErrCode as Integer)

Adds a new record to


the business
component.

Dim busComp as SiebelBusComp


busComp.NewRecord(whereIndicator as Integer, ErrCode as
Integer)

Moves to the next


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.NextRecord(ErrCode as Integer)

Returns the parent


business component.

Dim busComp as SiebelBusComp


Dim parentBusComp as SiebelBusComp
Set parentBusComp = busComp.ParentBusComp(ErrCode as
Integer)

Places the currently


selected record in a
picklist business
component into the
appropriate fields of
the parent business
component.

Dim busComp as SiebelBusComp


busComp.Pick(ErrCode as Integer)

Moves to the previous


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.PreviousRecord(ErrCode as Integer)

Refines a query after a


query has been
executed.

Dim busComp as SiebelBusComp


busComp.RefineQuery(ErrCode as Integer)

Assigns a new value


to the named field for
the current row of the
business component.

Dim busComp as SiebelBusComp

page 3-130

LastRecord
page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
ParentBusComp
page 3-138

Pick
page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142
SetFieldValue
page 3-143

C- 6

Siebel Object Interfaces Reference

Set oApplet = busComp.SetFieldValue(ErrCode as Integer)

Version 6.0

COM Data Server Quick Reference


Business Component

Table C-2.

Business Component Methods Syntax Summary

(Sheet 4 of 4)

Method

Description

Syntax

SetFormattedFieldValue

Accepts the field


value in the current
local format and
assigns the new value
to the named field for
the current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFormattedFieldValue(FieldName as String,
FieldValue as String, ErrCode as Integer)

Sets a named search


specification on the
business component.

Dim busComp as SiebelBusComp


busComp.SetNamedSearch(searchName as String, searchSpec
as String, ErrCode as Integer)

Sets the search


specification for the
business component.

Dim busComp as SiebelBusComp


busComp.SetSearchExpr(searchSpec as String, ErrCode as
Integer)

Sets the search


specification for the
specified field.

Dim busComp as SiebelBusComp


busComp.SetSearchSpec(FieldName as String, searchSpec
as String, ErrCode as Integer)

Sets the sort


specification for a
query.

Dim busComp as SiebelBusComp


busComp.SetSortSpec(sortSpec as String, ErrCode as
Integer)

Sets the value of the


specified User
Property.

Dim busComp as SiebelBusComp


busComp.SetUserProperty(propertyName as String,
newValue as String, ErrCode as Integer)

Deletes an active
record created by
NewRecord.

Dim busComp as SiebelBusComp


busComp.UndoRecord(ErrCode as Integer)

Commits to the
database any changes
made to the current
record.

Dim busComp as SiebelBusComp


busComp.WriteRecord(ErrCode as Integer)

page 3-145

SetNamedSearch
page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SetUserProperty
page 3-156
UndoRecord
page 3-160
WriteRecord
page 3-161

Version 6.0

Siebel Object Interfaces Reference

C-7

COM Data Server Quick Reference


Business Object

Business Object
Table C-3.

Business Object Methods Syntax Summary

Method

Description

Syntax

GetBusComp

Returns the
specified business
component.

Dim busObject as SiebelBusObject


Dim busComp as SiebelBusComp
set busComp = busObject.GetBusComp(BusCompName as
String, ErrCode as Integer)

Returns the name


of the control.

Dim busObject as SiebelBusObject


Dim sName as String
sName = busObject.Name(ErrCode as Integer)

page 3-186

Name
page 3-189

Business Service
Table C-4.

Business Service Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

GetFirstProperty

Retrieves the name of the first


property of a business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetFirstProperty(ErrCode as Integer)

Once the name of the first


property has been retrieved,
retrieves the name of the next
property of a business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetNextProperty(ErrCode as Integer)

Retrieves the value stored in


the specified property.

Dim oService as SiebelService


Dim sValue as String
sValue = oService.GetProperty(propName as String,
ErrCode as Integer)

Returns the name of the


business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.Name

Calls a specialized method or a


user-created method on the
business service.

Dim oService as SiebelService


Dim Return
Return = oService.InvokeMethod(methodName as String,
InputArguments as SiebelPropertySet, OutputArguments
as SiebelPropertySet, ErrCode as Integer)

page 3-211
GetNextProperty
page 3-191

GetProperty
page 3-192

Name
page 3-195
InvokeMethod
page 3-193

C- 8

Siebel Object Interfaces Reference

Version 6.0

COM Data Server Quick Reference


Property Set

Table C-4.

Business Service Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

PropertyExists

Returns a Boolean value


indicating whether the property
specified in the argument
exists.

Dim oService as SiebelService


oService.PropertyExists(propName as String, ErrCode as
Integer)

Removes a property from a


business service.

Dim oService as SiebelService


oService.RemoveProperty(propName as String, ErrCode as
Integer)

Assigns a value to a property of


a business service.

Dim oService as SiebelService


oService.SetProperty(propName as String, propValue as
String, ErrCode as Integer)

page 3-217

RemoveProperty
page 3-197
SetProperty
page 3-198

Property Set
Table C-5.

Property Set Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

AddChild

Adds subsidiary property sets


to a property set.

Dim oPropSet as SiebelPropertySet


Dim iIndex as Integer
oPropSet.AddChild(childObject as String, ErrCode as
Integer)

Returns a copy of a property


set.

Dim oPropSet1 as SiebelPropertySet


Dim oPropSet2 as SiebelPropertySet
oPropSet2 = oPropSet1.Copy(ErrCode as Integer)

Returns a specified child


property set of a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetChild(index as Integer, ErrCode
as Integer)

Returns the number of child


property sets attached to a
parent property set.

Dim oPropSet as SiebelPropertySet


Dim iCount as Integer
iCount = oPropSet.GetChildCount(ErrCode as Integer)

Returns the name of the first


property in a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetFirstProperty(ErrCode as
Integer)

page 3-204

Copy
page 3-206
GetChild
page 3-208

GetChildCount
page 3-210
GetFirstProperty
page 3-211

Version 6.0

Siebel Object Interfaces Reference

C-9

COM Data Server Quick Reference


Property Set

Table C-5.

Property Set Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

GetNextProperty

Returns the name of the next


property in a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetNextProperty(ErrCode as
Integer)

Returns the value of a


property when given the
property name.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetProperty(propName as String,
ErrCode as Integer)

Returns the value stored in a


type in a property set.

Dim oPropSet as SiebelPropertySet


Dim sTypeVal as String
sTypeVal = oPropSet.GetType(value as String)

Returns a value stored as part


of a property set.

Dim oPropSet as SiebelPropertySet


Dim sValVal as String
sValVal = oPropSet.GetValue(value as String, ErrCode as
Integer)

Inserts a child property set


into a parent property set at a
specific location.

Dim oPropSet as SiebelPropertySet


oPropSet.InsertChildAt(childObject as String, index as
Integer, ErrCode as Integer)

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oPropSet as Property Set


oPropSet.PropertyExists(propName as String, ErrCode as
Integer)

Removes a child property set


as a specified index from a
parent property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveChild index as Integer

Removes the property


specified in its argument from
a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveProperty(propName as String, ErrCode as
Integer)

Removes all properties and


child property sets from a
property set.

Dim oPropSet as SiebelPropertySet


oPropSet.Reset(ErrCode as Integer)

Assigns a value to the


property of a property set
specified in its argument.

Dim oPropSet as SiebelPropertySet


oPropSet.SetProperty(propName as String, propValue as
String, ErrCode as Integer)

Assigns a data value to a type


member of a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetType(value as String, ErrCode as Integer)

Assigns a data value to a


value member of a property
set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetValue(value as String)

page 3-212

GetProperty
page 3-213

GetType
page 3-214
GetValue
page 3-215

InsertChildAt
page 3-216
PropertyExists
page 3-217

RemoveChild
page 3-218
RemoveProperty
page 3-219
Reset
page 3-220
SetProperty
page 3-221
SetType
page 3-222
SetValue
page 3-223

C- 1 0

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference

Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-3
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-5
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-9
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-10
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-11
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-13

Version 6.0

Siebel Object Interfaces Reference

D-1

ActiveX Application Server Quick Reference


Applet

Applet
Table D-1.

Applet Methods Syntax Summary

Method

Description

Syntax

ActiveControl

Returns the control that


currently has the input focus
within the applet.

Dim applet as Applet


Dim control as Control
Set control as applet.ActiveControl

Returns the business


component that is associated
with the applet.

Dim applet as Applet


Dim busComp as SiebelBusComp
Set busComp = applet.BusComp

Returns the business object for


the business component for
the applet.

Dim applet as Applet


Dim busObject as BusObject
Set busObject = applet.BusObject

Navigates to the view that


corresponds to the argumentspecified drilldown object.

Dim applet as Applet


applet.Drilldown(drilldown_object as String)

Returns the control whose


name is specified in the
argument.

Dim applet as Applet


Dim control as Control
Set control = applet.FindControl(controlName as String)

Navigates to the argumentnamed control.

Dim applet as Applet


applet = applet.GotoControl(controlObj as Control)

Calls an argument-specified
specialized method.

Dim applet as Applet


applet.InvokeMethod(methodName as String, methodArgs as
String or StringArray)

Returns the name of the applet.

Dim applet as Applet


Dim sApplet as String
sApplet = applet.Name

Posts the changes made to


the applet.

Dim applet as Applet


Dim bCode as Boolean
bCode = applet.PostChanges

page 3-25
BusComp
page 3-26
BusObject
page 3-28
Drilldown
page 3-29
FindControl
page 3-32
GotoControl
page 3-33
InvokeMethod
page 3-34
Name
page 3-36
PostChanges
page 3-37

D-2

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference


Application

Application
Table D-2.

Application Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

ActiveApplet

Returns the applet that has


the input focus.

Dim application as SiebelApplication


Dim applet as Applet
Set applet = application.ActiveApplet

Returns the business component


associated with the active applet.

Dim application as Siebelapplication


Dim busComp as SiebelBusComp
Set busComp = application.ActiveBusComp

Returns the business object for the


business component for the active
applet.

Dim application as Siebelapplication


Dim busObject as BusObject
Set busObject = application.ActiveBusObject

Returns the control that has the


input focus.

Dim application as Siebelapplication


Dim control as Control
Set control = application.ActiveControl

Returns the name of the


active view.

Dim application as Siebelapplication


Dim sView as String
sView = application.ActiveViewName

Returns the three-letter operating


currency code.

Dim application as Siebelapplication


Dim sCur as String
sCur = Application.CurrencyCode

Enables/disables native COM


error handling.

Dim application as Siebelapplication


Dim bEnable as Boolean
bEnable = application.EnableExceptions(bEnable)

Returns the applet object


identified in the argument.

Dim application as Siebelapplication


Dim applet as Applet
set applet = application.FindApplet(appletName as
String)

Instantiates and returns a new


instance of the business object
specified in the argument.

Dim application as Siebelapplication


Dim busObject as BusObject
set busObject =
application.GetBusObject(busobjName as String)

Returns the last error code.

Dim application as Siebelapplication


Dim iErr as Integer
iErr = GetLastErrCode

Returns the last error text message.

Dim application as Siebelapplication


Dim sText as String
sText = application.GetLastErrText

Returns the value of an attribute in


a user profile.

Dim oApplication as SiebelApplication


Dim sAttr as String
SAttr = oApplication.GetProfileAttr(name as
String)

page 3-48
ActiveBusComp
page 3-49
ActiveBusObject
page 3-50
ActiveControl
page 3-51
ActiveViewName
page 3-53
CurrencyCode
page 3-54
EnableExceptions
page 3-55
FindApplet
page 3-56

GetBusObject
page 3-57

GetLastErrCode
page 3-58
GetLastErrText
page 3-59
GetProfileAttr
page 3-60

Version 6.0

Siebel Object Interfaces Reference

D-3

ActiveX Application Server Quick Reference


Application

Table D-2.

Application Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

GetService

Instantiates and returns a new


instance of the argument-specified
service.

Dim oApplication as Siebelapplication


Dim oService as SiebelService
set Service = Application.GetService(serviceName
as String)

Sets the focus to the specified


applet.

Dim application as Siebelapplication


application.GotoApplet(appletObj as Applet)

Activates the named view and


its business object.

Dim application as Siebelapplication


application.GotoView(viewName as String,
[BusinessObjectName as string])

Calls the named specialized


method.

Dim application as Siebelapplication


Dim sReturn as String
sReturn = application.InvokeMethod(methodName as
String, methodArgs as String or StringArray)

Allows external applications to log


in to the COM Data Server.

Dim application as Siebelapplication


Dim sErr as String
sErr = application.Login(connectString as String,
userName as String, password as String)

Returns the login ID of the user


who started the Siebel application.

Dim application as Siebelapplication


Dim sID as String
sID = application.LoginId

Returns the login name of the user


who started the Siebel application.

Dim application as Siebelapplication


Dim sUser as String
sUser = application.LoginName

Disconnects the client from the


server.

Dim application as Siebelapplication


application.Logoff

Constructs and returns a new


property set object.

Dim application as Siebelapplication


Dim propSet as SiebelPropertySet
propSet = application.NewPropertySet()

Returns the position ID that


describes the users current
position.

Dim application as Siebelapplication


Dim sRow as String
sRow = application.PositionId

Returns the position name of the


users current position.

Dim application as Siebelapplication


Dim sPosition as String
sPosition = application.PositionName

Used in personalization to assign


values to attributes in a user
profile.

Dim oApplication as SiebelApplication


oApplication.SetProfileAttr(name as String, value
as String)

Displays a message in the status


bar.

Dim application as Siebelapplication


application.ShowStatus(message as String)

page 3-61

GotoApplet
page 3-63
GotoView
page 3-64
InvokeMethod
page 3-68

Login
page 3-70

LoginId
page 3-72
LoginName
page 3-73
Logoff
page 3-74
NewPropertySet
page 3-78
PositionId
page 3-79
PositionName
page 3-80
SetProfileAttr
page 3-83
ShowStatus
page 3-84

D-4

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference


Business Component

Business Component
Table D-3.

Business Component Methods Syntax Summary

(Sheet 1 of 4)

Method

Description

Syntax

ActivateField

Allows queries to
retrieve data for the
specified field.

Dim busComp as SiebelBusComp


BusComp.ActivateField(fieldName as String)

Enables updates of the


user interface when
the business
component is
updated.

Dim busComp as SiebelBusComp


BusComp.AllowNotification

Creates a new manyto-many relationship


for the parent object
through an
association business
component.

Dim busComp as SiebelBusComp


busComp.Associate(whereIndicator as Integer)

Returns the business


object that contains
the business
component.

Dim busComp as SiebelBusComp


Dim busObject as BusObject
Set busObject = busComp.BusObject

Clears the current


query and sort
specifications on the
business component.

Dim busComp as SiebelBusComp


busComp.ClearToQuery

Deactivates all
currently activated
fields.

Dim busComp as SiebelBusComp


busComp.DeactivateFields

Removes the current


record from the
business component.

Dim busComp as SiebelBusComp


busComp.DeleteRecord

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery(cursorMode as Boolean)

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery2(cursorMode as Boolean,
ignoreMaxCursorSize as Boolean)

Moves to the first


record in the business
component.

Dim busComp as SiebelBusComp


Dim bIsRecord
bIsRecord = busComp.FirstRecord

page 3-98
AllowNotification
page 3-100

Associate
page 3-101

BusObject
page 3-103

ClearToQuery
page 3-104

DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111

Version 6.0

Siebel Object Interfaces Reference

D-5

ActiveX Application Server Quick Reference


Business Component

Table D-3.

Business Component Methods Syntax Summary

(Sheet 2 of 4)

Method

Description

Syntax

GetAssocBusComp

Returns the
association business
component.

Dim busComp as SiebelBusComp


Dim AssocBusComp as SiebelBusComp
Set AssocBusComp = busComp.GetAssocBusComp

Returns a value for the


field specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFieldValue(FieldName as String)

Returns a formatted
value for the field
specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFormattedFieldValue(FieldName as
String)

Returns the most


recent error text
message.

Dim busComp as SiebelBusComp


Dim sErrtext as String
sErrtext = busComp.GetLastErrText

Returns the MVG


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim mVGBusComp as SiebelBusComp
set mVGBusComp = busComp.GetMVGBusComp(FieldName as
String)

Returns the argumentnamed search


specification.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetNamedSearch(SearchName as String)

Returns the pick


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim pickBusComp as SiebelBusComp
Set pickBusComp = busComp.GetPicklistBusComp(FieldName
as String)

Returns the current


search expression.

Dim busComp as SiebelBusComp


Dim sExpr as String
sExpr = busComp.GetSearchExpr

Returns the current


search specification
for the field specified
in the argument.

Dim busComp as SiebelBusComp


Dim sSpec as String
sSpec = busComp.GetSearchSpec(FieldName as String)

Returns the visibility


mode for the business
component.

Dim busComp as SiebelBusComp


Dim iMode as Integer
iMode = busComp.GetViewMode

page 3-113
GetFieldValue
page 3-115
GetFormattedFieldValue
page 3-117

GetLastErrText
page 3-120
GetMVGBusComp
page 3-121

GetNamedSearch
page 3-123
GetPicklistBusComp
page 3-124

GetSearchExpr
page 3-126
GetSearchSpec
page 3-127

GetViewMode
page 3-129

D-6

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference


Business Component

Table D-3.

Business Component Methods Syntax Summary

(Sheet 3 of 4)

Method

Description

Syntax

InvokeMethod

Calls the specialized


method named in the
argument.

Dim busComp as SiebelBusComp


Dim sReturn as String
sReturn = busComp.InvokeMethod(methodName as String,
methodArgs as String or StringArray)

Moves to the last


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.LastRecord

Returns the name of


the business
component.

Dim busComp as SiebelBusComp


Dim sName as String
sName = busComp.Name

Adds a new record to


the business
component.

Dim busComp as SiebelBusComp


busComp.NewRecord(whereIndicator as Integer)

Moves to the next


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.NextRecord

Returns the parent


business component.

Dim busComp as SiebelBusComp


Dim parentBusComp as SiebelBusComp
Set parentBusComp = busComp.ParentBusComp

Places the currently


selected record in a
picklist business
component into the
appropriate fields of
the parent business
component.

Dim busComp as SiebelBusComp


busComp.Pick

Moves to the previous


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.PreviousRecord

Refines a query after a


query has been
executed.

Dim busComp as SiebelBusComp


busComp.RefineQuery

Assigns a new value to


the named field for the
current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFieldValue(FieldName as String, FieldValue
as String)

page 3-130

LastRecord
page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
ParentBusComp
page 3-138
Pick
page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142
SetFieldValue
page 3-143

Version 6.0

Siebel Object Interfaces Reference

D-7

ActiveX Application Server Quick Reference


Business Component

Table D-3.

Business Component Methods Syntax Summary

(Sheet 4 of 4)

Method

Description

Syntax

SetFormattedFieldValue

Accepts the field value


in the current local
format and assigns the
new value to the
named field for the
current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFormattedFieldValue(FieldName as String,
FieldValue as String)

Sets a named search


specification on the
business component.

Dim busComp as SiebelBusComp


busComp.SetNamedSearch(searchName as String, searchSpec
as String)

Sets the search


specification for the
business component.

Dim busComp as SiebelBusComp


busComp.SetSearchExpr(searchSpec as String)

Sets the search


specification for the
specified field.

Dim busComp as SiebelBusComp


busComp.SetSearchSpec(FieldName as String, searchSpec
as String)

Sets the sort


specification for
a query.

Dim busComp as SiebelBusComp


busComp.SetSortSpec(sortSpec as String)

Disables the updates


to the user interface
that result from
changes to the
business component.

Dim busComp as SiebelBusComp


busComp.SuppressNotification

Deletes an active
record created by
NewRecord.

Dim busComp as SiebelBusComp


busComp.UndoRecord

Commits to the
database any changes
made to the current
record.

Dim busComp as SiebelBusComp


busComp.WriteRecord

page 3-145

SetNamedSearch
page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SuppressNotification
page 3-159

UndoRecord
page 3-160
WriteRecord
page 3-161

D-8

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference


Business Object

Business Object
Table D-4.

Business Object Methods Syntax Summary

Method

Description

Syntax

GetBusComp

Returns the
specified business
component.

Dim busObject as BusObject


Dim busComp as SiebelBusComp
set busComp = BusObject.GetBusComp(BusCompName
as String)

Returns the most


recent error code.

Dim busObject as BusObject


Dim iErr as Integer
busObject.GetLastErrCode

Returns the most


recent error text.

Dim busObject as BusObject


Dim sErr as String
busObject.GetLastErrText

Returns the name


of the control.

Dim busObject as BusObject


Dim sName as String
sName = busObject.Name

page 3-186

GetLastErrCode
page 3-187
GetLastErrText
page 3-188
Name
page 3-189

Version 6.0

Siebel Object Interfaces Reference

D-9

ActiveX Application Server Quick Reference


Business Service

Business Service
Table D-5.

Business Service Methods Syntax Summary

Method

Description

Syntax

GetFirstProperty

Retrieves the name of the first


property of a business
service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetFirstProperty()

Once the name of the first


property has been retrieved,
retrieves the name of the next
property of a business
service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetNextProperty()

Retrieves the value stored in


the specified property.

Dim oService as SiebelService


Dim sValue as String
sValue = oService.GetProperty(propName as String)

Calls a specialized method or


a user-created method on the
business service.

Dim oService as SiebelService


Dim Return
Return = oService.InvokeMethod(methodName as String,
InputArguments as SiebelPropertySet, OutputArguments as
SiebelPropertySet)

Returns the name of the


business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.Name

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oService as SiebelService


oService.PropertyExists(propName as String)

Removes a property from a


business service.

Dim oService as SiebelService


oService.RemoveProperty(propName as String)

Assigns a value to a property


of a business service.

Dim oService as SiebelService


oService.SetProperty(propName as String, propValue as
String)

page 3-211
GetNextProperty
page 3-191

GetProperty
page 3-192
InvokeMethod
page 3-193

Name
page 3-195
PropertyExists
page 3-217

RemoveProperty
page 3-197
SetProperty
page 3-198

D-10

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference


Property Set

Property Set
Table D-6.

Property Set Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

AddChild

Adds subsidiary property sets


to a property set.

Dim oPropSet as SiebelPropertySet


Dim iIndex as Integer
oPropSet.AddChild(childObject as String)

Returns a copy of a property


set.

Dim oPropSet1 as SiebelPropertySet


Dim oPropSet2 as SiebelPropertySet
oPropSet2 = oPropSet1.Copy()

Returns a specified child


property set of a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetChild(index as Integer)

Returns the number of child


property sets attached to a
parent property set.

Dim oPropSet as SiebelPropertySet


Dim iCount as Integer
iCount = oPropSet.GetChildCount()

Returns the name of the first


property in a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetFirstProperty()

Returns the name of the next


property in a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetNextProperty()

Returns the value of a


property when given the
property name.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetProperty(propName as String)

Returns the value stored in a


type in a property set.

Dim oPropSet as SiebelPropertySet


Dim sTypeVal as String
sTypeVal = oPropSet.GetType(value as String)

Returns a value stored as part


of a property set.

Dim oPropSet as SiebelPropertySet


Dim sValVal as String
sValVal = oPropSet.GetValue(value as String)

Inserts a child property set


into a parent property set at a
specific location.

Dim oPropSet as SiebelPropertySet


oPropSet.InsertChildAt(childObject as String, index as
Integer)

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oPropSet as Property Set


oPropSet.PropertyExists(propName as String)

page 3-204
Copy
page 3-206
GetChild
page 3-208
GetChildCount
page 3-210
GetFirstProperty
page 3-211
GetNextProperty
page 3-212
GetProperty
page 3-213
GetType
page 3-214
GetValue
page 3-215
InsertChildAt
page 3-216
PropertyExists
page 3-217

Version 6.0

Siebel Object Interfaces Reference

D-11

ActiveX Application Server Quick Reference


Property Set

Table D-6.

Property Set Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

RemoveChild

Removes a child property set


as a specified index from a
parent property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveChild(index as Integer)

Removes the property


specified in its argument from
a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveProperty(propName as String)

Removes all properties and


child property sets from a
property set.

Dim oPropSet as SiebelPropertySet


oPropSet.Reset()

Assigns a value to the


property of a property set
specified in its argument.

Dim oPropSet as SiebelPropertySet


oPropSet.SetProperty(propName as String, propValue as
String)

Assigns a data value to a type


member of a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetType(value as String)

Assigns a data value to a


value member of a property
set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetValue(value as String)

page 3-218
RemoveProperty
page 3-219
Reset
page 3-220
SetProperty
page 3-221
SetType
page 3-222
SetValue
page 3-223

D-12

Siebel Object Interfaces Reference

Version 6.0

ActiveX Application Server Quick Reference


Control

Control

Table D-7.
Method

Description

Syntax

Applet

Returns the parent


applet for the control.

Dim control as Control


Dim applet as Applet
Set applet = control.Applet

Returns the
corresponding business
component for the
control.

Dim control as Control


Dim busComp as SiebelBusComp
Set busComp = control.busComp

Returns the
corresponding business
object for the control.

Dim control as Control


Dim busObject as BusObject
Set applet = control.BusObject

Function that returns the


value of a control
property.

Dim control as Control


control.GetProperty(propName as String)

Returns the value of the


control.

Dim control as Control


Dim sValue as String
sValue = control.GetValue

Returns the name of the


object.

Dim control as Control


Dim sName as String
sName = control.Name

Sets visual properties of


a control.

Dim control as Control


control.SetProperty(propName as String,
propValue as String)

Sets the contents of the


control to the indicated
value.

Dim control as Control


control.SetValue(controlValue as String)

page 3-224
BusComp
page 3-225

BusObject
page 3-226
GetProperty
page 3-227
GetValue
page 3-229
Name
page 3-230
SetProperty
page 3-231
SetValue
page 3-233

Version 6.0

Control Methods Syntax Summary

Siebel Object Interfaces Reference

D-13

ActiveX Application Server Quick Reference


Control

D-14

Siebel Object Interfaces Reference

Version 6.0

ActiveX Data Control Quick Reference

Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-4
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-8
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-9
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-10

Version 6.0

Siebel Object Interfaces Reference

E-1

ActiveX Data Control Quick Reference


Application

Application
Table E-1.

Application Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

CurrencyCode

Returns the three-letter


operating currency code.

Dim application as SiebelApplication


Dim sCur as String
sCur = Application.CurrencyCode

Enables/disables native
COM error handling.

Dim application as SiebelApplication


Dim bEnable as Boolean
bEnable = application.EnableExceptions(bEnable)

page 3-57

Instantiates and returns a


new instance of the business
object specified in the
argument.

Dim application as SiebelApplication


Dim busObject as SiebelBusObject
set busObject = application.GetBusObject(busobjName as
String)

GetLastErrCode

Returns the last error code.

Dim application as SiebelApplication


Dim iErr as Integer
iErr = GetLastErrCode

Returns the last error text


message.

Dim application as SiebelApplication


Dim sText as String
sText = application.GetLastErrText

Returns the value of an


attribute in a user profile.

Dim oApplication as SiebelApplication


Dim sAttr as String
SAttr = oApplication.GetProfileAttr(name as String)

Instantiates and returns a


new instance of the
argument specified service.

Dim oApplication as SiebelApplication


Dim oService as SiebelService
set Service = Application.GetService(serviceName as
String)

Calls the named specialized


method.

Dim application as SiebelApplication


Dim sReturn as String
sReturn = application.InvokeMethod(methodName as
String, methodArgs as String or StringArray)

Allows external applications


to log in to the COM Data
Server.

Dim application as SiebelApplication


Dim sErr as String
sErr = application.Login(connectString as String,
userName as String, password as String)

Returns the login ID of the


user who started the Siebel
application.

Dim application as SiebelApplication


Dim sID as String
sID = application.LoginId

Returns the login name of


the user who started the
Siebel application.

Dim application as SiebelApplication


Dim sUser as String
sUser = application.LoginName

page 3-54
EnableExceptions
page 3-55
GetBusObject

page 3-58
GetLastErrText
page 3-59
GetProfileAttr
page 3-60
GetService
page 3-61

InvokeMethod
page 3-68

Login
page 3-70

LoginId
page 3-72
LoginName
page 3-73

E-2

Siebel Object Interfaces Reference

Version 6.0

ActiveX Data Control Quick Reference


Application

Table E-1.

Application Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

NewPropertySet

Constructs and returns a


new property set object.

Dim application as SiebelApplication


Dim PropSet as ProperySet
PropSet = oApplication.NewPropertySet()

Returns the position ID that


describes the users current
position.

Dim application as SiebelApplication


Dim sRow as String
sRow = application.PositionId

Returns the position name


of the users current
position.

Dim application as SiebelApplication


Dim sPosition as String
sPosition = application.PositionName

Used in personalization to
assign values to attributes in
a user profile.

Dim application as SiebelApplication


application.SetProfileAttr(name as String, value as
String)

page 3-78
PositionId
page 3-79
PositionName
page 3-80
SetProfileAttr
page 3-83

Version 6.0

Siebel Object Interfaces Reference

E-3

ActiveX Data Control Quick Reference


Business Component

Business Component
Table E-2.

Business Component Methods Syntax Summary

(Sheet 1 of 4)

Method

Description

Syntax

ActivateField

Allows queries to
retrieve data for the
specified field.

Dim busComp as SiebelBusComp


BusComp.ActivateField(fieldName as String)

Creates a new manyto-many relationship


for the parent object
through an
association business
component.

Dim busComp as SiebelBusComp


busComp.Associate(whereIndicator as Integer)

Returns the business


object that contains
the business
component.

Dim busComp as SiebelBusComp


Dim busObject as SiebelBusObject
Set busObject = busComp.BusObject

Clears the current


query and sort
specifications on the
business component.

Dim busComp as SiebelBusComp


busComp.ClearToQuery

Deactivates all
currently activated
fields.

Dim busComp as SiebelBusComp


busComp.DeactivateFields

Removes the current


record from the
business component.

Dim busComp as SiebelBusComp


busComp.DeleteRecord

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery(cursorMode as Boolean)

Fetches a set of
BusComp records.

Dim busComp as SiebelBusComp


busComp.ExecuteQuery2(cursorMode as Boolean,
ignoreMaxCursorSize as Boolean)

Moves to the first


record in the business
component.

Dim busComp as SiebelBusComp


Dim bIsRecord as Boolean
bIsRecord = busComp.FirstRecord

Returns the
association business
component.

Dim busComp as SiebelBusComp


Dim AssocBusComp as SiebelBusComp
Set AssocBusComp = busComp.GetAssocBusComp

page 3-98
Associate
page 3-101

BusObject
page 3-103

ClearToQuery
page 3-104

DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111
GetAssocBusComp
page 3-113

E-4

Siebel Object Interfaces Reference

Version 6.0

ActiveX Data Control Quick Reference


Business Component

Table E-2.

Business Component Methods Syntax Summary

(Sheet 2 of 4)

Method

Description

Syntax

GetFieldValue

Returns a value for


the field specified in
the argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFieldValue(FieldName as String)

Returns a formatted
value for the field
specified in the
argument.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetFormattedFieldValue(FieldName as
String)

Returns the most


recent error text
message.

Dim busComp as SiebelBusComp


Dim sErr as String
busComp.GetLastErrText

Returns the MVG


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim mVGBusComp as SiebelBusComp
set mVGBusComp = busComp.GetMVGBusComp(FieldName as
String)

Returns the
argument-named
search specification.

Dim busComp as SiebelBusComp


Dim sValue as String
sValue = busComp.GetNamedSearch(SearchName as String)

Returns the pick


business component
associated with the
field specified in the
argument.

Dim busComp as SiebelBusComp


Dim pickBusComp as SiebelBusComp
Set pickBusComp = busComp.GetPicklistBusComp(FieldName
as String)

Returns the current


search expression.

Dim busComp as SiebelBusComp


Dim sExpr as String
sExpr = busComp.GetSearchExpr

Returns the current


search specification
for the field specified
in the argument.

Dim busComp as SiebelBusComp


Dim sSpec as String
sSpec = busComp.GetSearchSpec(FieldName as String)

Returns the visibility


mode for the business
component.

Dim busComp as SiebelBusComp


Dim iMode as Integer
iMode = busComp.GetViewMode

Calls the specialized


method named in the
argument.

Dim busComp as SiebelBusComp


Dim sReturn as String
sReturn = busComp.InvokeMethod(methodName as String,
methodArgs as String or StringArray)

page 3-115
GetFormattedFieldValue
page 3-117

GetLastErrText
page 3-120
GetMVGBusComp
page 3-121

GetNamedSearch
page 3-123
GetPicklistBusComp
page 3-124

GetSearchExpr
page 3-126
GetSearchSpec
page 3-127

GetViewMode
page 3-129
InvokeMethod
page 3-130

Version 6.0

Siebel Object Interfaces Reference

E-5

ActiveX Data Control Quick Reference


Business Component

Table E-2.

Business Component Methods Syntax Summary

(Sheet 3 of 4)

Method

Description

Syntax

LastRecord

Moves to the last


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.LastRecord

Returns the name of


the business
component.

Dim busComp as SiebelBusComp


Dim sName as String
sName = busComp.Name

Adds a new record to


the business
component.

Dim busComp as SiebelBusComp


busComp.NewRecord(whereIndicator as Integer)

Moves to the next


record in the business
component.

Dim busComp as SiebelBusComp


bReturn as Boolean
bReturn = busComp.NextRecord

Returns the parent


business component.

Dim busComp as SiebelBusComp


Dim parentBusComp as SiebelBusComp
Set parentBusComp = busComp.ParentBusComp

Places the currently


selected record in a
picklist business
component into the
appropriate fields of
the parent business
component.

Dim busComp as SiebelBusComp


busComp.Pick

Moves to the previous


record in the business
component.

Dim busComp as SiebelBusComp


Dim bReturn as Boolean
bReturn = busComp.PreviousRecord

Refines a query after a


query has been
executed.

Dim busComp as SiebelBusComp


busComp.RefineQuery

Assigns a new value


to the named field for
the current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFieldValue(FieldName as String, FieldValue
as String)

Accepts the field


value in the current
local format and
assigns the new value
to the named field for
the current row of the
business component.

Dim busComp as SiebelBusComp


busComp.SetFormattedFieldValue(FieldName as String,
FieldValue as String)

page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
ParentBusComp
page 3-138
Pick
page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142
SetFieldValue
page 3-143

SetFormattedFieldValue
page 3-145

E-6

Siebel Object Interfaces Reference

Version 6.0

ActiveX Data Control Quick Reference


Business Component

Table E-2.

Business Component Methods Syntax Summary

(Sheet 4 of 4)

Method

Description

Syntax

SetNamedSearch

Sets a named search


specification on the
business component.

Dim busComp as SiebelBusComp


busComp.SetNameSearch(searchName as String, searchSpec
as String)

Sets the search


specification for the
business component.

Dim busComp as SiebelBusComp


busComp.SetSearchExpr(searchSpec as String)

Sets the search


specification for the
specified field.

Dim busComp as SiebelBusComp


busComp.SetSearchSpec(FieldName as String, searchSpec
as String)

Sets the sort


specification for a
query.

Dim busComp as SiebelBusComp


busComp.SetSortSpec(sortSpec as String)

Disables the updates


to the user interface
that result from
changes to the
business component.

Dim busComp as SiebelBusComp


busComp.SuppressNotification

Deletes an active
record created by
NewRecord.

Dim busComp as SiebelBusComp


busComp.UndoRecord

Commits to the
database any changes
made to the current
record.

Dim busComp as SiebelBusComp


busComp.WriteRecord

page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SuppressNotification
page 3-159

UndoRecord
page 3-160
WriteRecord
page 3-161

Version 6.0

Siebel Object Interfaces Reference

E-7

ActiveX Data Control Quick Reference


Business Object

Business Object
Table E-3.

Business Object Methods Syntax Summary

Method

Description

Syntax

GetBusComp

Returns the specified


business component.

Dim busObject as SiebelBusObject


Dim busComp as SiebelBusComp
set busComp = BusObject.GetBusComp(BusCompName as
String)

Returns the most recent


error code.

Dim busObject as SiebelBusObject


Dim iErr as Integer
busObject.GetLastErrCode

Returns the most recent


error text.

Dim busObject as SiebelBusObject


Dim sErr as String
busObject.GetLastErrText

Returns the name of


the control.

Dim busObject as SiebelBusObject


Dim sName as String
sName = busObject.Name

page 3-186

GetLastErrCode
page 3-187
GetLastErrText
page 3-188
Name
page 3-189

E-8

Siebel Object Interfaces Reference

Version 6.0

ActiveX Data Control Quick Reference


Business Service

Business Service
Table E-4.

Business Service Methods Syntax Summary

Method

Description

Syntax

GetFirstProperty

Retrieves the name of the first


property of a business
service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetFirstProperty()

Once the name of the first


property has been retrieved,
retrieves the name of the next
property of a business
service.

Dim oService as SiebelService


Dim sName as String
sName = oService.GetNextProperty()

Retrieves the value stored in


the specified property.

Dim oService as SiebelService


Dim sValue as String
sValue = oService.GetProperty(propName as String)

Returns the name of the


business service.

Dim oService as SiebelService


Dim sName as String
sName = oService.Name

Calls a specialized method or


a user-created method on the
business service.

Dim oService as SiebelService


Dim Return
Return = oService.InvokeMethod(methodName as String,
InputArguments as SiebelPropertySet, OutputArguments as
SiebelPropertySet)

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oService as SiebelService


oService.PropertyExists(propName as String)

Removes a property from a


business service.

Dim oService as SiebelService


oService.RemoveProperty(propName as String)

Assigns a value to a property


of a business service.

Dim oService as SiebelService


oService.SetProperty(propName as String, propValue as
String)

page 3-190
GetNextProperty
page 3-191

GetProperty
page 3-192
Name
page 3-195
InvokeMethod
page 3-193

PropertyExists
page 3-217

RemoveProperty
page 3-197
SetProperty
page 3-198

Version 6.0

Siebel Object Interfaces Reference

E-9

ActiveX Data Control Quick Reference


Property Set

Property Set
Table E-5.

Property Set Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

AddChild

Adds subsidiary property sets


to a property set.

Dim oPropSet as SiebelPropertySet


Dim iIndex as Integer
oPropSet.AddChild(childObject as String)

Returns a copy of a property


set.

Dim oPropSet1 as SiebelPropertySet


Dim oPropSet2 as SiebelPropertySet
oPropSet2 = oPropSet1.Copy()

Returns a specified child


property set of a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetChild(index as Integer)

Returns the number of child


property sets attached to a
parent property set.

Dim oPropSet as SiebelPropertySet


Dim iCount as Integer
iCount = oPropSet.GetChildCount()

Returns the name of the first


property in a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetFirstProperty()

Returns the name of the next


property in a property set.

Dim oPropSet as SiebelPropertySet


Dim sPropName as String
sPropName = oPropSet.GetNextProperty()

Returns the value of a


property when given the
property name.

Dim oPropSet as SiebelPropertySet


Dim sPropVal as String
sPropVal = oPropSet.GetProperty(propName as String)

Returns the value stored in a


type in a property set.

Dim oPropSet as SiebelPropertySet


Dim sTypeVal as String
sTypeVal = oPropSet.GetType(value as String)

Returns a value stored as part


of a property set.

Dim oPropSet as SiebelPropertySet


Dim sValVal as String
sValVal = oPropSet.GetValue(value as String)

Inserts a child property set


into a parent property set at a
specific location.

Dim oPropSet as SiebelPropertySet


oPropSet.InsertChildAt(childObject as String, index as
Integer)

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

Dim oPropSet as Property Set


oPropSet.PropertyExists(propName as String)

page 3-204
Copy
page 3-206
GetChild
page 3-208
GetChildCount
page 3-210
GetFirstProperty
page 3-211
GetNextProperty
page 3-212
GetProperty
page 3-213
GetType
page 3-214
GetValue
page 3-215
InsertChildAt
page 3-216
PropertyExists
page 3-217

E-10

Siebel Object Interfaces Reference

Version 6.0

ActiveX Data Control Quick Reference


Property Set

Table E-5.

Property Set Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

RemoveChild

Removes a child property set


as a specified index from a
parent property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveChild(index as Integer)

Removes the property


specified in its argument from
a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.RemoveProperty(propName as String)

Removes all properties and


child property sets from a
property set.

Dim oPropSet as SiebelPropertySet


oPropSet.Reset()

Assigns a value to the


property of a property set
specified in its argument.

Dim oPropSet as SiebelPropertySet


oPropSet.SetProperty(propName as String, propValue as
String)

Assigns a data value to a type


member of a property set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetType(value as String)

Assigns a data value to a


value member of a property
set.

Dim oPropSet as SiebelPropertySet


oPropSet.SetValue(value as String)

page 3-218
RemoveProperty
page 3-219
Reset
page 3-220
SetProperty
page 3-221
SetType
page 3-222
SetValue
page 3-223

Version 6.0

Siebel Object Interfaces Reference

E-11

ActiveX Data Control Quick Reference


Property Set

E-12

Siebel Object Interfaces Reference

Version 6.0

CORBA Quick Reference

Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-2
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-4
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-7
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-7
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-8
SiebelAppFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F-9

Version 6.0

Siebel Object Interfaces Reference

F-1

CORBA Quick Reference


Application

Application
Table F-1.

CORBA Interface SiebelApplication

(Sheet 1 of 2)

Method

Description

IDL

CurrencyCode

Returns the three-letter operating


currency code.

readonly attribute CurrencyCode;

Instantiates and returns a new


instance of the argument
specified business object.

SiebelBusObject GetBusObject(in string


BusObjectName) raises (SiebelException);

Returns the last error text


message.

readonly attribute string GetLastErrText;

Returns the value of an attribute


in a user profile.

string GetProfileAttr(in string name) raises


(SiebelException);

Gets the shared user-defined


global variables.

string GetSharedGlobal(in string varName) raises


(SiebelException);

Instantiates and returns a new


instance of the argumentspecified service.

SiebelService GetService(in string ServiceName)


raises (SiebelException);

Calls the named specialized


method.

string InvokeMethod(in string methodName, in anySeq


methodArgs) raises (SiebelException);

Allows external applications to


log in to the CORBA object
manager.

void Login(in string UserName, in string Password)


raises (SiebelException);

Returns the login ID of the user


who started the Siebel
application.

readonly attribute string LoginId;

Returns the login name of the


user who started the Siebel
application.

readonly attribute string LoginName;

Disconnects the client from the


server.

void Logoff() raises (SiebelException);

Returns the position ID that


describes the users current
position.

readonly attribute string PositionId;

page 3-54
GetBusObject
page 3-57
GetLastErrText
page 3-59
GetProfileAttr
page 3-60
GetSharedGlobal
page 3-62
GetService
page 3-61
InvokeMethod
page 3-68
Login
page 3-70
LoginId
page 3-72
LoginName
page 3-73
Logoff
page 3-74
PositionId
page 3-79

F-2

Siebel Object Interfaces Reference

Version 6.0

CORBA Quick Reference


Application

Table F-1.

CORBA Interface SiebelApplication

(Sheet 2 of 2)

Method

Description

IDL

NewPropertySet

Returns the position ID that


describes the users current
position.

SiebelPropertySet NewPropertySet() raises


(SiebelException);

Returns the position name of the


users current position.

readonly attribute string PositionName;

Used in personalization to assign


values to attributes in a user
profile.

void SetProfileAttr(in string name, in string


value) raises (SiebelException);

Sets a shared user-defined global


variable.

void SetSharedGlobal(in string varName, in string


value) raises (SiebelException);

Appends a message to the


trace file.

void Trace(in string Message) raises


(SiebelException);

Turns off the tracing started by


TraceOn.

void TraceOff() raises (SiebelException);

Turns tracing on.

void TraceOn(in string FileName, in string


Category, in string Source) raises
(SiebelException);

page 3-78
PositionName
page 3-80
SetProfileAttr
page 3-83
SetSharedGlobal
page 3-82
Trace
page 3-85
TraceOff
page 3-87
TraceOn
page 3-88

Version 6.0

Siebel Object Interfaces Reference

F-3

CORBA Quick Reference


Business Component

Business Component

Table F-2.

CORBA Interface SiebelBusComp

Method

Description

IDL

ActivateField

Allows queries to retrieve data


for the specified field.

void ActivateField(in string FieldName) raises


(SiebelException);

Creates a new many-to-many


relationship for the parent
object through an association
business component.

void Associate(in short where) raises


(SiebelException);

Returns the business object


that contains the business
component.

readonly attribute SiebelBusObject BusObject;

Clears the current query and


sort specifications on the
business component.

void ClearToQuery() raises (SiebelException);

Deactivates all currently


activated fields.

void DeactivateFields() raises


(SiebelException);

Removes the current record


from the business component.

void DeleteRecord() raises (SiebelException);

Fetches a set of BusComp


records.

void ExecuteQuery(in boolean cursorMode) raises


(SiebelException);

Fetches a set of BusComp


records.

void ExecuteQuery2(in boolean cursorMode, in


boolean ignoreMaxCursorSize) raises
(SiebelException);

Moves to the first record in the


business component.

boolean FirstRecord() raises (SiebelException);

Returns the association


business component.

SiebelBusComp GetAssocBusComp() raises


(SiebelException);

Returns a value for the


argument-specified field.

string GetFieldValue(in string FieldName) raises


(SiebelException);

Returns a formatted value for


the argument-specified field.

string GetFormattedFieldValue(in string


FieldName) raises (SiebelException);

page 3-98
Associate
page 3-101

BusObject
page 3-103
ClearToQuery
page 3-104
DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111
GetAssocBusComp
page 3-113
GetFieldValue
page 3-115
GetFormattedFieldValue
page 3-117

F-4

Siebel Object Interfaces Reference

(Sheet 1 of 3)

Version 6.0

CORBA Quick Reference


Business Component

Table F-2.

CORBA Interface SiebelBusComp

Method

Description

IDL

GetMVGBusComp

Returns the MVG business


component associated with the
argument-specified field.

SiebelBusComp GetMVGBusComp(in string


FieldName) raises (SiebelException);

Returns the argument-named


search specification.

string GetNamedSearch(in string searchName)


raises (SiebelException);

Returns the pick business


component associated with the
argument-specified field.

SiebelBusComp GetPicklistBusComp(in string


FieldName) raises (SiebelException);

Returns the current search


expression.

attribute string SearchExpr;

Returns the current search


specification for the argumentspecified field.

string GetSearchSpec(in string FieldName) raises


(SiebelException);

Returns the value for an


argument-specified property
name.

string GetUserProperty(in string Property)


raises (SiebelException);

Returns the visibility mode for


the business component.

attribute short ViewMode;

Calls the specialized method


named in the argument.

string InvokeMethod(in string methodName, in


anySeq methodArgs) raises (SiebelException);

Moves to the last record in the


business component.

boolean LastRecord() raises (SiebelException);

Returns the name of the


business component.

readonly attribute string Name;

Adds a new record to the


business component.

void NewRecord(in short where) raises


(SiebelException);

Moves to the next record in the


business component.

boolean NextRecord() raises (SiebelException);

Returns the parent business


component.

SiebelBusComp ParentBusComp() raises


(SiebelException);

page 3-121
GetNamedSearch
page 3-123
GetPicklistBusComp
page 3-124
GetSearchExpr
page 3-126
GetSearchSpec
page 3-127
GetUserProperty
page 3-128
GetViewMode
page 3-129
InvokeMethod
page 3-130
LastRecord
page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
ParentBusComp
page 3-138

Version 6.0

(Sheet 2 of 3)

Siebel Object Interfaces Reference

F-5

CORBA Quick Reference


Business Component

Table F-2.

CORBA Interface SiebelBusComp

Method

Description

IDL

Pick

Places the currently selected


record in a picklist business
component into the
appropriate fields of the parent
business component.

void Pick() raises (SiebelException);

Moves to the previous record in


the business component.

boolean PreviousRecord() raises


(SiebelException);

Refines a query after a query


has been executed.

void RefineQuery() raises (SiebelException);

Assigns a new value to the


named field for the current row
of the business component.

void SetFieldValue(in string FieldName, in


string FieldValue) raises (SiebelException);

Accepts the field value in the


current local format and
assigns the new value to the
named field for the current row
of the business component.

void SetFormattedFieldValue(in string


FieldName, in string FieldValue) raises
(SiebelException);

Sets a named search


specification on the business
component.

void SetNamedSearch(in string searchName, in


string searchText) raises (SiebelException);

Sets the search specification for


the business component.

attribute string SearchExpr;

Sets the search specification for


the specified field.

void SetSearchSpec(in string FieldName, in


string SearchSpec) raises (SiebelException);

Sets the sort specification for a


query.

void SetSortSpec(in string SortSpec) raises


(SiebelException);

Sets the value of the specified


User Property.

void SetUserProperty(in string Property, in


string value) raises (SiebelException);

Sets the visibility type for the


business component.

attribute short ViewMode;

Deletes an active record created


by NewRecord.

void UndoRecord() raises (SiebelException);

Commits to the database any


changes made to the current
record.

void WriteRecord() raises (SiebelException);

page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142
SetFieldValue
page 3-143
SetFormattedFieldValue
page 3-145

SetNamedSearch
page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SetUserProperty
page 3-156
SetViewMode
page 3-157
UndoRecord
page 3-160
WriteRecord
page 3-161

F-6

Siebel Object Interfaces Reference

(Sheet 3 of 3)

Version 6.0

CORBA Quick Reference


Business Object

Business Object
Table F-3.

CORBA Interface SiebelBusObject

Method

Description

IDL

GetBusComp

Returns the specified business


component.

SiebelBusComp GetBusComp(in string BusCompName)


raises (SiebelException);

Returns the name of the control.

readonly attribute string Name;

page 3-186
Name
page 3-189

Business Service
Table F-4.

CORBA Inteface SiebelService

Method

Description

IDL

GetFirstProperty

Retrieves the name of the first


property of a business service.

string

GetNextProperty() raises (SiebelException);

Once the name of the first


property has been retrieved,
retrieves the name of the next
property of a business service.

string

GetNextProperty() raises (SiebelException);

Retrieves the value stored in


the specified property.

string GetProperty(in string propName) raises


(SiebelException);

Returns the name of the


business service.

readonly attribute string name;

Calls a specialized method or a


user-created method on the
business service.

void InvokeMethod(in string method,in


SiebelPropertySet inputs, inout SiebelPropertySet
outputs) raises (SiebelException);

Returns a Boolean value


indicating whether the property
specified in the argument
exists.

boolean PropertyExists(in string propName) raises


(SiebelException);

Removes a property from a


business service.

void RemoveProperty(in string propName) raises


(SiebelException);

Assigns a value to a property of


a business service.

void SetProperty(in string propName, in string


propValue) raises (SiebelException);

page 3-211
GetNextProperty
page 3-191

GetProperty
page 3-192
Name
page 3-195
InvokeMethod
page 3-193
PropertyExists
page 3-217

RemoveProperty
page 3-197
SetProperty
page 3-198

Version 6.0

Siebel Object Interfaces Reference

F-7

CORBA Quick Reference


Property Set

Property Set
Table F-5.

CORBA Interface SiebelPropertySet

(Sheet 1 of 2)

Method

Description

IDL

AddChild

Adds subsidiary property sets


to a property set.

long AddChild (in SiebelPropertySet child) raises


(SiebelException);

Returns a copy of a property


set.

SiebelPropertySet Copy () raises (SiebelException);

Returns a specified child


property set of a property set.

SiebelPropertySet GetChild (in long index) raises


(SiebelException);

page 3-204
Copy
page 3-206
GetChild
page 3-208
GetChildCount
page 3-210
GetFirstProperty
page 3-211
GetNextProperty
page 3-212
GetProperty
page 3-213
GetType
page 3-214
GetValue
page 3-215
InsertChildAt
page 3-216
PropertyExists
page 3-217

RemoveChild
page 3-218

F-8

Returns the number of child


property sets attached to a
parent property set.

readonly attribute long ChildCount;

Returns the name of the first


property in a property set.

string GetFirstProperty() raises (SiebelException);

Returns the name of the next


property in a property set.

string GetNextProperty() raises (SiebelException);

Returns the value of a


property when given the
property name.

string GetProperty(in string propName) raises


(SiebelException);

Returns the value stored in a


type in a property set.

string GetType(in string value) raises


(SiebelException);

Returns a value stored as part


of a property set.

string GetValue(in string value) raises


(SiebelException);

Inserts a child property set


into a parent property set at a
specific location.

void InsertChildAt (in SiebelPropertySet child, in long


index) raises (SiebelException);

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

boolean PropertyExists(in string propName) raises


(SiebelException);

Removes a child property set


as a specified index from a
parent property set.

void RemoveChild(in long index) raises


(SiebelException);

Siebel Object Interfaces Reference

Version 6.0

CORBA Quick Reference


SiebelAppFactory

Table F-5.

CORBA Interface SiebelPropertySet

(Sheet 2 of 2)

Method

Description

IDL

RemoveProperty

Removes the property


specified in its argument
from a property set.

void PropertySet.RemoveProperty(in String propName)


raises (SiebelException);

Removes all properties and


child property sets from a
property set.

void PropertySet.Reset() raises (SiebelException);

Assigns a value to the


property of a property set
specified in its argument.

void PropertySet.SetProperty(in string propName, in


string propValue) raises (SiebelException);

Assigns a data value to a type


member of a property set.

void PropertySet.SetType in string value) raises


(SiebelException);

Assigns a data value to a


value member of a property
set.

void PropertySet.SetValue(in string value) raises


(SiebelException);

page 3-219
Reset
page 3-220
SetProperty
page 3-221
SetType
page 3-222
SetValue
page 3-223

SiebelAppFactory
Table F-6.

CORBA Interface SiebelAppFactory

Method

Description

IDL

CreateSiebelAppObject

Returns a CORBA
object reference
for an application
object.

SiebelApplication CreatSiebelAppObject()
raises (SiebelException);

page 3-245

Version 6.0

Siebel Object Interfaces Reference

F-9

CORBA Quick Reference


SiebelAppFactory

F-1 0

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference

Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-3
Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-6
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-11
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-11
PropertySet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-13
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G-14
Miscellaneous Interfaces and Events . . . . . . . . . . . . . . . . . . . . . . . . . G-15

Version 6.0

Siebel Object Interfaces Reference

G-1

Siebel eScript Quick Reference


Applet

Applet
Table G-1.

Applet Methods Syntax Summary

Method

Description

Syntax

ActiveControl()

Returns the control that currently


has the input focus within the
applet.

var applet;
var control;
control = applet.ActiveControl();

Returns the business component


that is associated with the applet.

var applet;
var myBusComp;
busComp = applet.myBusComp();

Returns the business object for


the business component for the
applet.

var applet;
var busObject;
busObject = applet.BusObject();

Navigates to the view that


corresponds to the argumentspecified drilldown object.

var applet;
applet.Drilldown(drilldown_object);

Returns the control whose name


is specified in the argument.

var applet;
var control;
control = applet.FindControl(controlName);

Navigates to the argumentnamed control.

var applet;
applet.GotoControl(controlObj);

Calls an argument-specified
specialized method.

var applet;
applet.InvokeMethod(methodName, methodArg1,
methodArg2, ..., methodArgn);

Returns the name of the applet.

var applet;
var sApplet;
sApplet = applet.Name();

Posts any pending changes in the


applet to its business component.

var applet;
var bSuccess;
iReturn = applet.PostChanges();

page 3-25
BusComp()
page 3-26
BusObject()
page 3-28
Drilldown()
page 3-29
FindControl()
page 3-32
GotoControl()
page 3-33
InvokeMethod()
page 3-34
Name()
page 3-36
PostChanges()
page 3-37

G-2

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


Application

Table G-2.

Applet Events Summary

Event

Description

Syntax

Applet_ChangeRecord()

Called when the applet


gets the focus.

Applet_GotFocus();

Called when
applet.InvokeMethod
is called.

Applet_InvokeMethod(MethodName);

Called when the applet


loses focus.

Applet_LostFocus();

Called before a
specialized method is
invoked.

Applet_PreInvokeMethod(MethodName);

page 3-39
Applet_InvokeMethod()
page 3-42
Applet_Load()
page 3-43
Applet_PreInvokeMethod()
page 3-46

Application
Table G-3.

Application Methods Syntax Summary

(Sheet 1 of 3)

Method

Description

Syntax

ActiveApplet()

Returns the applet that has


the input focus.

var applet;
applet = TheApplication().ActiveApplet();

Returns the business


component associated
with the active applet.

var busComp;
busComp = TheApplication().ActiveBusComp();

Returns the business


object for the business
component for the active
applet.

var busObject;
busObject = TheApplication().ActiveBusObject();

Returns the control that


has the input focus.

var control;
control = TheApplication().ActiveControl();

Returns the name of the


active view.

var sView;
sView = TheApplication().ActiveViewName();

Returns the three-letter


operating currency code.

var sCur;
sCur = TheApplication().CurrencyCode();

page 3-48
ActiveBusComp()
page 3-49
ActiveBusObject()
page 3-50

ActiveControl()
page 3-51
ActiveViewName()
page 3-53
CurrencyCode()
page 3-54

Version 6.0

Siebel Object Interfaces Reference

G-3

Siebel eScript Quick Reference


Application

Table G-3.

Application Methods Syntax Summary

(Sheet 2 of 3)

Method

Description

Syntax

FindApplet()

Returns the applet object


identified in the argument.

var applet;
applet = TheApplication().FindApplet(appletName);

Instantiates and returns a


new instance of the
business object specified
in the argument.

var myBusObject;
myBusObject = TheApplication().GetBusObject(BusObject);

Returns the value of an


attribute in a user profile.

var sAttr;
sAttr = TheApplication.()GetProfileAttr(name);

Instantiates and returns a


new instance of the service
specified in the argument.

var Service;
Service = TheApplication().GetService(serviceName);

Gets the shared userdefined global variables.

var sName;
sName = TheApplication().GetSharedGlobal(varName);

Sets the focus to the


specified applet.

TheApplication().GotoApplet(appletObj);

Activates the named view


and its business object.

TheApplication().GotoView(viewName,[
BusinessObjectName]);

Prompts user for input.

TheApplication.InputBox(prompt
[,title][,default][,xpos][,ypos];

Calls the named


specialized method.

var sReturn;
sReturn = TheApplication().InvokeMethod(methodName,
methodArg1, methodArg2,..., methodArgn);

Returns the login ID of the


user who started the Siebel
application.

var sID;
sID = TheApplication().LoginId();

Returns the login name of


the user who started the
Siebel application.

var sUser;
sUser = TheApplication().LoginName();

Displays a message box.

var iResponse;
iResponse = TheApplication().MsgBox(prompt[, buttons][,
title]);

Constructs and returns a


new property set object.

var oPropSet;
oPropSet = TheApplication().NewPropertySet();

Returns the position ID


that describes the users
current position.

var sRow;
sRow = TheApplication().PositionId();

page 3-56
GetBusObject()
page 3-57

GetProfileAttr
page 3-60
GetService()
page 3-61
GetSharedGlobal()
page 3-62
GotoApplet()
page 3-63
GotoView()
page 3-64
InputBox()
page 3-66
InvokeMethod()
page 3-68
LoginId()
page 3-72
LoginName()
page 3-73
MsgBox()
page 3-75
NewPropertySet()
page 3-78
PositionId()
page 3-79

G-4

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


Application

Table G-3.

Application Methods Syntax Summary

(Sheet 3 of 3)

Method

Description

Syntax

PositionName()

Returns the position name


of the users current
position.

var sPosition;
sPosition = TheApplication().PositionName();

Used in personalization to
assign values to attributes
in a user profile.

TheApplication().SetProfileAttr(name, value);

Sets a shared user-defined


global variable.

TheApplication().SetSharedGlobal(varName, value);

Displays a message in the


status bar.

TheApplication().ShowStatus(message);

Appends a message to the


trace file.

TheApplication().Trace(message);

Turns off the tracing


started by TraceOn.

TheApplication().TraceOff();

Turns tracing on.

TheApplication().TraceOn(filename, type, selection);

page 3-80
SetProfileAttr
page 3-83
SetSharedGlobal()
page 3-82
ShowStatus()
page 3-84
Trace()
page 3-85
TraceOff()
page 3-87
TraceOn()
page 3-88

Table G-4.

Application Events Syntax Summary

Event

Description

Syntax

Application_Close()

Called before the application


exits.

Application_Close();

Called after a specialized


method is invoked.

Application_InvokeMethod(methodName);

Called when a user exits the


application.

Application_PreClose();

Called before a specialized


method is invoked.

Application_PreInvokeMethod(methodName);

Called when the client starts.

Application_Start(commandLine);

page 3-91
Application_InvokeMethod()
page 3-92
Application_PreClose()
page 3-93
Application_PreInvokeMethod()
page 3-94
Application_Start()
page 3-96

Version 6.0

Siebel Object Interfaces Reference

G-5

Siebel eScript Quick Reference


Business Component

Business Component
Table G-5.

Business Component Methods Syntax Summary

(Sheet 1 of 4)

Method

Description

Syntax

ActivateField()

Allows queries to retrieve data


for the specified field.

var myBusComp;
myBusComp.ActivateField(fieldName);

Enables updates to the user


interface that result from
changes to the business
component.

var myBusComp;
myBusComp.AllowNotification();

Creates a new many-to-many


relationship for the parent
object through an association
business component.

var myBusComp;
myBusComp.Associate(whereIndicator);

Returns the business object


that contains the business
component.

var myBusComp;
var busObject;
busObject = myBusComp.BusObject();

Clears the current query and


sort specifications on the
business component.

var myBusComp;
myBusComp.ClearToQuery();

Deactivates all currently


activated fields.

var myBusComp;
myBusComp.DeactivateFields();

Removes the current record


from the business component.

var myBusComp;
myBusComp.DeleteRecord()

Fetches a set of BusComp


records.

var myBusComp;
myBusComp.ExecuteQuery(cursorMode);

Fetches a set of BusComp


records.

var myBusComp;
myBusComp.ExecuteQuery2(cursorMode,
ignoreMaxCursorSize);

Moves to the first record in the


business component.

var myBusComp;
var bIsRecord;
bIsRecord = myBusComp.FirstRecord();

Moves to the first record of the


multiple selection in the
business component.

var myBusComp;
var bIsMultipleSelection;
bIsMultipleSelection =
myBusComp.FirstSelected();

Returns the association


business component.

var myBusComp;
var AssocBusComp;
AssocBusComp = myBusComp.GetAssocBusComp();

page 3-98
AllowNotification()
page 3-100

Associate()
page 3-101

BusObject()
page 3-103
ClearToQuery()
page 3-104
DeactivateFields()
page 3-105
DeleteRecord()
page 3-106
ExecuteQuery()
page 3-107
ExecuteQuery2()
page 3-110
FirstRecord()
page 3-111
FirstSelected()
page 3-112

GetAssocBusComp()
page 3-113

G-6

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


Business Component

Table G-5.

Business Component Methods Syntax Summary

(Sheet 2 of 4)

Method

Description

Syntax

GetFieldValue()

Returns a value for the field


specified in the argument.

var myBusComp;
var sValue
sValue = myBusComp.GetFieldValue(FieldName);

Returns a formatted value for


the field specified in the
argument.

var myBusComp;
var sValue;
sValue =
myBusComp.GetFormattedFieldValue(FieldName);

Returns the MVG business


component associated with the
field specified in the argument.

var myBusComp;
var MvgBusComp;
MvgBusComp=
myBusComp.GetMVGBusComp(FieldName);

Returns the named search


specification specified in the
argument.

var myBusComp;
var sValue;
sValue = myBusComp.GetNamedSearch(SearchName);

Returns the pick business


component associated with the
field specified in the argument.

var myBusComp;
var pickBusComp;
pickBusComp =
myBusComp.GetPicklistBusComp(FieldName);

Returns the current search


expression.

var myBusComp;
var sExpr;
sExpr = myBusComp.GetSearchExpr()

Returns the current search


specification for the field
specified in the argument.

var myBusComp;
var sSpec;
sSpec = myBusComp.GetSearchSpec(FieldName);

Returns the value for a


property name specified in the
argument.

var myBusComp;
var sValue;
sValue =
myBusComp.GetUserProperty(propertyName);

Returns the visibility mode for


the business component.

var myBusComp;
var iMode;
iMode = myBusComp.GetViewMode();

Calls the specialized method


named in the argument.

var myBusComp;
var sReturn;
sReturn = myBusComp.InvokeMethod(methodName,
methodArg1, methodArg2,..., methodArgn);

Moves to the last record in the


business component.

var myBusComp;
var iReturn;
iReturn = myBusComp.LastRecord();

Returns the name of the


business component.

var myBusComp;
var sName;
sName = myBusComp.Name();

page 3-115
GetFormattedFieldValue()
page 3-117

GetMVGBusComp()
page 3-121

GetNamedSearch()
page 3-123
GetPicklistBusComp()
page 3-124

GetSearchExpr()
page 3-126
GetSearchSpec()
page 3-127
GetUserProperty()
page 3-128

GetViewMode()
page 3-129
InvokeMethod()
page 3-130

LastRecord()
page 3-132
Name()
page 3-133

Version 6.0

Siebel Object Interfaces Reference

G-7

Siebel eScript Quick Reference


Business Component

Table G-5.

Business Component Methods Syntax Summary

(Sheet 3 of 4)

Method

Description

Syntax

NewRecord()

Adds a new record to the


business component.

var myBusComp;
myBusComp.NewRecord(whereIndicator);

Moves to the next record in the


business component.

var myBusComp;
var bFound;
bFound = myBusComp.NextRecord();

Moves to the next record of the


current multiple selection.

var myBusComp;
var iReturn;
iReturn = myBusComp.NextSelected();

Returns the parent business


component.

var myBusComp;
var parentBusComp;
parentBusComp = myBusComp.ParentBusComp();

Places the currently selected


record in a picklist business
component into the
appropriate fields of the parent
business component.

var myBusComp;
myBusComp.Pick();

Moves to the previous record


in the business component.

var myBusComp;
var iReturn;
iReturn = myBusComp.PreviousRecord();

Refines a query after a query


has been executed.

var myBusComp;
myBusComp.RefineQuery();

Assigns a new value to the


named field for the current row
of the business component.

var myBusComp;
myBusComp.SetFieldValue(FieldName,
FieldValue);

Accepts the field value in the


current local format and
assigns the new value to the
named field for the current row
of the business component.

var myBusComp;
myBusComp.SetFormattedFieldValue(FieldName,
FieldValue);

Sets a named search


specification on the business
component.

var myBusComp;
myBusComp.SetNamedSearch(searchName,
searchSpec);

Sets the search specification


for the business component.

var myBusComp;
myBusComp.SetSearchExpr(searchSpec);

Sets the search specification


for the specified field.

var myBusComp;
myBusComp.SetSearchSpec(FieldName,
searchSpec);

Sets the sort specification for a


query.

var myBusComp;
myBusComp.SetSortSpec(sortSpec);

page 3-134
NextRecord()
page 3-136
NextSelected()
page 3-137
ParentBusComp()
page 3-138
Pick()
page 3-139

PreviousRecord()
page 3-141
RefineQuery()
page 3-142
SetFieldValue()
page 3-143
SetFormattedFieldValue()
page 3-145

SetNamedSearch()
page 3-147
SetSearchExpr()
page 3-148
SetSearchSpec()
page 3-150
SetSortSpec()
page 3-154

G-8

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


Business Component

Table G-5.

Business Component Methods Syntax Summary

(Sheet 4 of 4)

Method

Description

Syntax

SetUserProperty()

Sets the value of the specified


User Property.

var myBusComp;
myBusComp.SetUserProperty(propertyName,
newValue);

Disables the updates to the


user interface that result from
changes to the business
component.

var myBusComp;
myBusComp.SuppressNotification();

Deletes an active record


created by NewRecord.

var myBusComp;
myBusComp.UndoRecord();

Commits to the database any


changes made to the current
record.

var myBusComp;
myBusComp.WriteRecord();

page 3-156
SuppressNotification()
page 3-159

UndoRecord()
page 3-160
WriteRecord()
page 3-161

Table G-6.

Business Component Events Syntax Summary

(Sheet 1 of 2)

Event

Description

Syntax

BusComp_Associate()

Called after a record is added


to a business component to
create an association.

BusComp_Associate();

Called after the current row


changes in the business
component.

BusComp_ChangeRecord();

Called after a new row is


copied in the business
component.

BusComp_CopyRecord();

Called after a row is deleted in


the business component.

BusComp_DeleteRecord();

Called when the value of a


business component field is
accessed.

BusComp_InvokeMethod(methodName,methodArg1,
methodArg2,..., methodArgn);

Called after a new row has


been created and made active
in the business component.

BusComp_NewRecord();

Called before a record is


added to a business
component to create an
association.

BusComp_PreAssociate();

page 3-164
BusComp_ChangeRecord()
page 3-165
BusComp_CopyRecord()
page 3-167
BusComp_DeleteRecord()
page 3-168
BusComp_InvokeMethod()
page 3-169
BusComp_NewRecord()
page 3-170
BusComp_PreAssociate()
page 3-171

Version 6.0

Siebel Object Interfaces Reference

G-9

Siebel eScript Quick Reference


Business Component

Table G-6.

Business Component Events Syntax Summary

(Sheet 2 of 2)

Event

Description

Syntax

BusComp_PreCopyRecord()

Called before a new row is


copied in the business
component.

BusComp_PreCopyRecord();

Called before a row is deleted


in the business component.

BusComp_PreDeleteRecord();

Called when the value of the


business component field is
accessed.

BusComp_PreGetFieldValue(FieldName,
&FieldValue);

Called before a specialized


method is invoked on a
business component.

BusComp_PreInvokeMethod(methodName);

Called before a new row is


created in the business
component.

BusComp_PreNewRecord();

Called before query


execution.

BusComp_PreQuery();

Called when a value is pushed


down into the business
component from the user
interface.

BusComp_PreSetFieldValue(FieldName,
FieldValue);

Called before a row is written


out to the database.

BusComp_PreWriteRecord();

Called after the query is


complete and all rows have
been retrieved, but before
they have been displayed.

BusComp_Query();

Called after a value has been


pushed down into the
business component from the
user interface.

BusComp_SetFieldValue(FieldName);

Called after a row is written to


the database.

BusComp_WriteRecord();

page 3-172
BusComp_PreDeleteRecord()
page 3-173
BusComp_PreGetFieldValue()
page 3-175
BusComp_PreInvokeMethod()
page 3-176
BusComp_PreNewRecord()
page 3-177
BusComp_PreQuery()
page 3-178
BusComp_PreSetFieldValue()
page 3-179

BusComp_PreWriteRecord()
page 3-181
BusComp_Query()
page 3-182

BusComp_SetFieldValue()
page 3-184

BusComp_WriteRecord()
page 3-185

G-10

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


Business Object

Business Object
Table G-7.

Business Object Methods Syntax Summary

Method

Description

Syntax

GetBusComp()

Function that returns


the specified business
component.

var myBusObject;
var myBusComp;
myBusComp =
myBusObject.GetBusComp(BusCompName);

Function that returns


the name of the
control.

var myBusObject as BusObject;


var sName;
sName = myBusObject.Name();

page 3-186

Name()
page 3-189

Business Service
Table G-8.

Business Service Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

GetFirstProperty()

Retrieves the name of the first


property of a business service.

var oService;
var sName;sName = oService.GetFirstProperty();

Once the name of the first


property has been retrieved,
retrieves the name of the next
property of a business service.

var oService;
var sName;
sName = oService.GetNextProperty();

Retrieves the value stored in


the specified property.

var oService;
var sValue;
sValue = oService.GetProperty(propName);

Returns the name of the


business service.

var oService;
var sName;
sName = oService.Name();

Calls a specialized method or a


user-created method on the
business service.

var oService;
var Return;
Return = oService.InvokeMethod(methodName,
InputArguments, OutputArguments);

Returns a Boolean value


indicating whether the property
specified in the argument
exists.

var oService;
oService.PropertyExists(propName);

page 3-190
GetNextProperty()
page 3-191

GetProperty()
page 3-192
Name
page 3-195
InvokeMethod()
page 3-193

PropertyExists()
page 3-196

Version 6.0

Siebel Object Interfaces Reference

G-11

Siebel eScript Quick Reference


Business Service

Table G-8.

Business Service Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

RemoveProperty()

Removes a property from a


business service.

var oService;
oService.RemoveProperty(propName);

Assigns a value to a property of


a business service.

var oService;
oService.SetProperty(propName, propValue);

page 3-197
SetProperty()
page 3-198

Table G-9.

Business Service Events Syntax Summary

Method

Description

Syntax

Service_InvokeMethod()

Called when a
business service is
accessed.

Service_InvokeMethod(methodName);

Called before a
specialized method
is invoked on a
business service.

Service_PreInvokeMethod(methodName, Inputs, Outputs);

page 3-199
Service_PreInvokeMethod()
page 3-200

G-12

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


PropertySet

PropertySet
Table G-10.

PropertySet Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

AddChild()

Adds subsidiary property sets to a property


set.

var oPropSet;
var iIndex;
oPropSet.AddChild(childObject);

Returns a copy of a property set.

var oPropSet1;
var oPropSet2;
oPropSet2 = oPropSet1.Copy();

Returns a specified child property set of a


property set.

var oPropSet;
var sPropVal;
sPropVal = oPropSet.GetChild(index);

Returns the number of child property sets


attached to a parent property set.

var oPropSet;
var iCount;
iCount = oPropSet.GetChildCount();

Returns the name of the first property in a


property set.

var oPropSet;
var sPropName
sPropName = oPropSet.GetFirstProperty()

Returns the name of the next property in a


property set.

var oPropSet;
var sPropName
sPropName = oPropSet.GetNextProperty()

Returns the value of a property when


given the property name.

var oPropSet;
var sPropVal
sPropVal = oPropSet.GetProperty(propName)

Returns the value stored in a type in a


property set.

var oPropSet;
var sTypeVal
sTypeVal = oPropSet.GetType(value)

Returns a value stored as part of a property


set.

var oPropSet;
var sValVal;
sValVal = oPropSet.GetValue(value);

Inserts a child property set into a parent


property set at a specific location.

var oPropSet;
oPropSet.InsertChildAt(childObject, index);

Returns a Boolean value indicating


whether the property specified in the
argument exists

var oPropSet;
oPropSet.PropertyExists(propName);

Removes a child property set as a specified


index from a parent property set.

var oPropSet;
oPropSet.RemoveChild(index);

page 3-204
Copy()
page 3-206
GetChild()
page 3-208
GetChildCount()
page 3-210
GetFirstProperty()
page 3-211
GetNextProperty()
page 3-212
GetProperty()
page 3-213
GetType()
page 3-214
GetValue()
page 3-215
InsertChildAt()
page 3-216
PropertyExists()
page 3-217
RemoveChild()
page 3-218

Version 6.0

Siebel Object Interfaces Reference

G-13

Siebel eScript Quick Reference


Control

Table G-10.

PropertySet Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

RemoveProperty()

Removes the property specified in its


argument from a property set.

var oPropSet;
oPropSet.RemoveProperty(propName);

Removes all properties and child property


sets from a property set.

var oPropSet;
oPropSet.Reset();

Assigns a value to the property of a


property set specified in its argument.

var oPropSet;
oPropSet.SetProperty propName , propValue

Assigns a data value to a type member of


a property set.

var oPropSet;
oPropSet.SetType(value);

Assigns a data value to a value member of


a property set.

var oPropSet;
oPropSet.SetValue(value);

page 3-219
Reset()
page 3-220
SetProperty()
page 3-221
SetType()
page 3-222
SetValue()
page 3-223

Control
Table G-11.

Control Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

Applet()

Returns the parent applet for the control.

var myControl;
var applet;
applet = myControl().Applet();

Returns the corresponding business component for


the control.

var myControl;
var myBusComp(
myBusComp = myControl.BusComp();

Returns the corresponding business object for the


control.

var myControl;
var myBusObject;
myBusObject = myControl.BusObject();

Function that returns the value of a control


property.

var control;
control.GetProperty(propName);

Returns the value of the control.

var myControl;
var sValue
sValue = myControl.GetValue()

Returns the name of the object.

var myControl;
var sName;
sName = myControl.Name();

page 3-224
BusComp()
page 3-225
BusObject()
page 3-226
GetProperty
page 3-227
GetValue()
page 3-229
Name()
page 3-230

G-14

Siebel Object Interfaces Reference

Version 6.0

Siebel eScript Quick Reference


Miscellaneous Interfaces and Events

Table G-11.

Control Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

SetProperty

Sets visual properties of a control.

Dim control;
control.SetProperty(propName, propValue);

Sets the contents of the control to the indicated


value.

var myControl;
myControl.SetValue(controlValue);

page 3-231
SetValue()
page 3-233

Miscellaneous Interfaces and Events


Table G-12.

Miscellaneous Method Syntax Summary

Method

Description

Syntax

theApplication()

Global method that returns the


unique object of type
Application.

TheApplication().Application_method;

page 3-249

Table G-13.

Miscellaneous Event Summary

Method

Description

Syntax

ControlName_Click()

Called when the user clicks a push-button


control.

ControlName_Click();

page 3-247

Version 6.0

Siebel Object Interfaces Reference

G-15

Siebel eScript Quick Reference


Miscellaneous Interfaces and Events

G-16

Siebel Object Interfaces Reference

Version 6.0

Java Data Bean Quick Reference

Data Bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-2


Business Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-3
Business Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-6
Business Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-6
Property Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-7
SiebelException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H-8

Version 6.0

Siebel Object Interfaces Reference

H-1

Java Data Bean Quick Reference


Data Bean

Data Bean
Table H-1.

SiebelDataBean Methods Syntax Summary

Method

Description

Syntax

CurrencyCode

Returns the three-letter


operating currency code.

public String currencyCode ()

Instantiates and returns a


new instance of the business
object specified in the
argument.

public SiebelBusObject GetBusObject (String boName)


throws SiebelException

Returns a specified service. If


the service is not already
running, it will be
constructed.

public SiebelService GetService (string serviceName)


throws SiebelException

Calls the named specialized


method.

public String invokeMethod (String name, String[] args)


throws SiebelException

Allows external applications


to log in to the Data Bean.

public boolean login (String connString, String


userName, String passWord) throws SiebelException

Returns the login ID of the


user who started the Siebel
application.

public String loginId ()

Returns the login name of the


user who started the Siebel
application.

public String loginName ()

Disconnects the client from


the server.

public void logoff() throws SiebelException

Constructs and returns a new


property set object.

public SiebelPropertySet newPropertySet()

Returns the position ID that


describes the users current
position.

public String positionId ()

Returns the position name of


the users current position.

public String positionName ()

page 3-54
GetBusObject
page 3-57

GetService
page 3-61

InvokeMethod
page 3-68
Login
page 3-70
LoginId
page 3-72
LoginName
page 3-73
Logoff
page 3-74
NewPropertySet
page 3-78
PositionId
page 3-79
PositionName
page 3-80

H- 2

Siebel Object Interfaces Reference

Version 6.0

Java Data Bean Quick Reference


Business Component

Business Component
Table H-2.

SiebelBusComp Methods Syntax Summary

(Sheet 1 of 3)

Method

Description

Syntax

ActivateField

Allows queries to retrieve


data for the specified field.

public boolean activateField (String fieldName)


throws SiebelException

Enables update of the user


interface when there are
changes to the business
component.

public boolean allowNotification () throws


SiebelException

Creates a new many-to-many


relationship for the parent
object through an association
business component.

public boolean associate (boolean isInsertBefore)


throws SiebelException

Returns the business object


that contains the business
component.

public SiebelBusObject busObject () throws


SiebelException

Clears the current query and


sort specifications on the
business component.

public boolean clearToQuery () throws


SiebelException

Deactivates all currently


activated fields.

public boolean deactivateFields()

Removes the current record


from the business
component.

public boolean deleteRecord () throws


SiebelException

Fetches a set of BusComp


records.

public boolean executeQuery (boolean cursorMode)


throws SiebelException

Fetches a set of BusComp


records.

public boolean executeQuery2 (boolean cursorMode,


boolean ignoreMaxCursorSize) throws
SiebelException

Moves to the first record in


the business component.

public boolean firstRecord () throws


SiebelException

Returns the association


business component.

public SiebelBusComp getAssocBusComp () throws


SiebelException

Returns a value for the field


specified in the argument.

public String getFieldValue (String fieldName)


throws SiebelException

Returns a formatted value for


the field specified in the
argument.

public String getFormattedFieldValue (String


fieldName) throws SiebelException

page 3-98
AllowNotification
page 3-100

Associate
page 3-101

BusObject
page 3-103
ClearToQuery
page 3-104
DeactivateFields
page 3-105
DeleteRecord
page 3-106
ExecuteQuery
page 3-107
ExecuteQuery2
page 3-110
FirstRecord
page 3-111
GetAssocBusComp
page 3-113
GetFieldValue
page 3-115
GetFormattedFieldValue
page 3-117

Version 6.0

Siebel Object Interfaces Reference

H-3

Java Data Bean Quick Reference


Business Component

Table H-2.

SiebelBusComp Methods Syntax Summary

(Sheet 2 of 3)

Method

Description

Syntax

GetMVGBusComp

Returns the MVG business


component associated with
the field specified in the
argument.

public SiebelBusComp getMVGBusComp (String


fieldName) throws SiebelException

Returns the argument-named


search specification.

public String getNamedSearch (String searchName)


throws SiebelException

Returns the pick business


component associated with
the field specified in the
argument.

public SiebelBusComp getPicklistBusComp (String


fieldName) throws SiebelException

Returns the current search


expression.

public String getSearchExpr () throws


SiebelException

Returns the current search


specification for the field
specified in the argument.

public String getSearchSpec (String fieldName)


throws SiebelException

Returns the value for the


property whose name is
specified in the argument.

public String getUserProperty (String property)


throws SiebelException

Returns the visibility mode


for the business component.

public int getViewMode ()

Calls the specialized method


named in the argument.

public String invokeMethod (String methodName,


String[] methodArgs) throws SiebelException

Moves to the last record in


the business component.

public boolean lastRecord () throws


SiebelException

Returns the name of the


business component.

public String name ()

Adds a new record to the


business component.

public boolean newRecord (boolean isInsertBefore)


throws SiebelException

Moves to the next record in


the business component.

public boolean nextRecord () throws


SiebelException

Returns the parent business


component.

public SiebelBusComp parentBusComp () throws


SiebelException

page 3-121

GetNamedSearch
page 3-123
GetPicklistBusComp
page 3-124

GetSearchExpr
page 3-126
GetSearchSpec
page 3-127
GetUserProperty
page 3-128
GetViewMode
page 3-129
InvokeMethod
page 3-130
LastRecord
page 3-132
Name
page 3-133
NewRecord
page 3-134
NextRecord
page 3-136
ParentBusComp
page 3-138

H- 4

Siebel Object Interfaces Reference

Version 6.0

Java Data Bean Quick Reference


Business Component

Table H-2.

SiebelBusComp Methods Syntax Summary

(Sheet 3 of 3)

Method

Description

Syntax

Pick

Places the currently selected


record in a picklist business
component into the
appropriate fields of the
parent business component.

public boolean pick () throws SiebelException

Moves to the previous record


in the business component.

public boolean previousRecord () throws


SiebelException

Refines a query after a query


has been executed.

public boolean refineQuery () throws


SiebelException

Assigns a new value to the


named field for the current
row of the business
component.

public boolean setFieldValue (String fieldName,


String fieldValue) throws SiebelException

Accepts the field value in the


current local format and
assigns the new value to the
named field for the current
row of the business
component.

public boolean setFormattedFieldValue (String


fieldName, String fieldValue) throws
SiebelException

Sets a named search


specification on the business
component.

public boolean setNamedSearch (String searchName,


String searchText) throws SiebelException

Sets the search specification


for the business component.

public boolean setSearchExpr (String searchExpr)


throws SiebelException

Sets the search specification


for the specified field.

public boolean setSearchSpec (String fieldName,


String searchSpec) throws SiebelException

Sets the sort specification for


a query.

public boolean setSortSpec (String sortSpec)


throws SiebelException

Sets the visibility type for the


business component.

public boolean setViewMode (int mode) throws


SiebelException

Sets the visibility type for the


business component.

public boolean suppressNotification () throws


SiebelException

Deletes an active record


created by NewRecord.

public boolean undoRecord () throws


SiebelException

Commits to the database any


changes made to the current
record.

public boolean writeRecord () throws


SiebelException

page 3-139

PreviousRecord
page 3-141
RefineQuery
page 3-142
SetFieldValue
page 3-143

SetFormattedFieldValue
page 3-145

SetNamedSearch
page 3-147
SetSearchExpr
page 3-148
SetSearchSpec
page 3-150
SetSortSpec
page 3-154
SetViewMode
page 3-157
SuppressNotification
page 3-159
UndoRecord
page 3-160
WriteRecord
page 3-161

Version 6.0

Siebel Object Interfaces Reference

H-5

Java Data Bean Quick Reference


Business Object

Business Object
Table H-3.

SiebelBusObject Methods Syntax Summary

Method

Description

Syntax

GetBusComp

Returns the specified business


component.

public SiebelBusComp getBusComp


(String busCompName) throws
SiebelException

Returns the name of the business


object.

public String name ()

page 3-186
Name
page 3-189

Business Service
Table H-4.

SiebelService Methods Syntax Summary

Method

Description

Syntax

InvokeMethod

Calls a specialized method or a


user-created method on the
business service.

public boolean invokeMethod(String


methodName, SiebelPropertySet
inputPropertySet, SiebelPropertySet
outputPropertySet) throws
SiebelException

Returns the name of the


service.

public String name ()

page 3-193

Name
page 3-195

H- 6

Siebel Object Interfaces Reference

Version 6.0

Java Data Bean Quick Reference


Property Set

Property Set
Table H-5.

SiebelPropertySet Methods Syntax Summary

(Sheet 1 of 2)

Method

Description

Syntax

AddChild

Adds subsidiary property sets


to a property set.

public int addChild(SiebelPropertySet propertySet)

Returns a copy of a property


set.

public void copy(SiebelPropertySet propertySet)

Returns a specified child


property set of a property set.

public SiebelPropertySet getChild(int index)

Returns the number of child


property sets attached to a
parent property set.

public int getChildCount()

Returns the name of the first


property in a property set.

public String getFirstProperty()

Returns the name of the next


property in a property set.

public String getNextProperty()

Returns the value of a


property when given the
property name.

public String getProperty(String propertyName)

Returns the value stored in a


type in a property set.

public String getType()

Returns a value stored as part


of a property set.

public String getValue()

Inserts a child property set


into a parent property set at a
specific location.

public boolean insertChildAt(SiebelPropertySet


propertySet, int index)

Returns a Boolean value


indicating whether the
property specified in the
argument exists.

public boolean propertyExists(String propertyName)

Removes a child property set


as a specified index from a
parent property set.

public boolean removeChild(int index)

page 3-204
Copy
page 3-206
GetChild
page 3-208
GetChildCount
page 3-210
GetFirstProperty
page 3-211
GetNextProperty
page 3-212
GetProperty
page 3-213
GetType
page 3-214
GetValue
page 3-215
InsertChildAt
page 3-216
PropertyExists
page 3-217

RemoveChild
page 3-218

Version 6.0

Siebel Object Interfaces Reference

H-7

Java Data Bean Quick Reference


SiebelException

Table H-5.

SiebelPropertySet Methods Syntax Summary

(Sheet 2 of 2)

Method

Description

Syntax

RemoveProperty

Removes the property


specified in its argument from
a property set.

public boolean removeProperty(String propertyName)

Removes all properties and


child property sets from a
property set.

public boolean setProperty(String propertyName, String


propertyValue)

Assigns a value to the


property of a property set
specified in its argument.

public boolean setProperty(String propertyName, String


propertyValue)

Assigns a data value to a type


member of a property set.

public boolean setType(java.lang.String type)

Assigns a data value to a


value member of a property
set.

public boolean setValue(String value)

page 3-219
Reset
page 3-220
SetProperty
page 3-221
SetType
page 3-222
SetValue
page 3-223

SiebelException
Table H-6.

SiebelException Methods Syntax Summary

Method

Description

Syntax

GetErrorCode

Gets a numeric error code.

public int getErrorCode()

Gets an error message.

public String getErrorMessage()

page 3-248
GetErrorMessage
page 3-248

H- 8

Siebel Object Interfaces Reference

Version 6.0

Index

A
accessing business components 2-63
ActivateField business component
method 3-98
active view name, returning 3-53
ActiveApplet 3-48
ActiveApplet application method 3-48
ActiveBusComp application method 3-49
ActiveBusObject application method 3-50
ActiveControl application method 3-51
ActiveViewName application method 3-53
ActiveX Application Control
communicating with Siebel
applications 2-9
instantiating 2-53
ActiveX control
Login method 3-70
specified in an argument, returning 3-31
ActiveX Data Control
communicating with Siebel
applications 2-9
from a server-side script 2-56
instantiating 2-53
instantiating through JavaScript 2-54
ActiveX interfaces
accessing 2-39
Siebel Business Objects, accessing 2-8
adding business rules to business
component 1-7, 1-8
adding new record 3-134
allocations, tracking 3-88
AllowNotification business component
method 3-100

Version 6.0

applet
control method 3-224
focus, setting 3-63
with input focus, returning 3-48
object type 2-18
Applet_ChangeFieldValue event 3-38
Applet_ChangeRecord event 3-39
Applet_GotFocus applet event 3-40
Applet_GotFocus event
firing of 2-80
Applet_InvokeMethod event 3-42, 3-237
Applet_Load event 3-43
Applet_LostFocus event 3-44
Applet_PreInvokeMethod event 3-46, 3-238
application factory object type 2-20
application object type 2-16
Application_Close event 3-91
Application_InvokeMethod event 3-92
Application_PreClose event 3-93
Application_Start event 3-96
arguments
syntax Intro-3
associate business component
method 3-101
returning 3-113

B
breakpoint 1-21
BusComp
control method 3-225
records, returning 3-107, 3-110
web applet method 3-234
BusComp_Associate event 3-164
BusComp_ChangeRecord event 3-165
BusComp_CopyRecord event 3-167

Siebel Object Interfaces Reference

Index

BusComp_DeleteRecord event 3-168


BusComp_InvokeMethod event 3-169
BusComp_NewRecord event 3-170
BusComp_PreAssociate event 3-171
BusComp_PreCopyRecord event 3-172
BusComp_PreDeleteRecord event 3-173
BusComp_PreGetFieldValue event 3-175
BusComp_PreInvokeMethod event 3-176
BusComp_PreNewRecord event 3-177
BusComp_PreQuery event 3-178
BusComp_PreSetFieldValue event 3-179
BusComp_PreWriteRecord event 3-181
BusComp_Query event 3-182
BusComp_SetFieldValue event 3-184
BusComp_WriteRecord event 3-185
business component
accessing 2-63
with an active applet, returning 3-49
adding new business rules to 1-8
associated with a Web applet,
returning 3-234
associated with an applet, returning 3-26
for a control, returning 3-225
name, returning 3-133
returning for a business object 3-186
business component object type 2-17
business object
for a business component for an active
applet, returning 3-28, 3-50
containing a business component,
returning 3-103
for a control, returning 3-226
name, returning 3-189
business object interfaces
functions of 2-3
business object object type 2-16
business rules
adding 1-8
described 1-4
business service object type 2-17

Siebel Object Interfaces Reference

business services
built-in 2-17
removing properties 3-197
retrieving property names 3-190, 3-191
retrieving property values 3-192
run-time 2-17
specialized 2-17
BusObject
activating 3-64
control method 3-226
Web applet method 3-234
BusObject business component
method 3-103

C
Calls 1-22
CancelOperation 2-77, 2-78, 3-201
check syntax command 1-20
ClearToQuery business component
method 3-104
COM 3-70
COM Data Server object, starting 3-69
COM interfaces
accessing 2-6
accessing in C++ 2-26
accessing in Microsoft Visual Basic 2-25
functionality 2-8
limitations 2-7
performance differences 2-8
COM, syntax conventions 2-24
Compiler/Interpreter 1-3
constants, table of 3-23
ContinueOperation 2-77, 2-78
control
contents, setting 3-233
with input focus, returning 3-25, 3-51
ControlName_Click event 3-247
controls
manipulating 2-70
rendering on a Web page 3-239
value, returning 3-229
copying records 3-134
CORBA, attributes in 3-14

Version 6.0

Index

CORBA Object Manager


installing 2-12
Login method 3-70
CORBA object reference, returning 3-245
CreateSiebelAppObject SiebelAppFactory
method 3-245
CurrencyCode application method 3-54

D
data
manipulation capabilities 1-4
retrieving for queries 3-98
transport 1-6
data types 3-117
data validation 1-4
date format 1-27
date variables 1-27
DeactivateFields business component
method 3-105
deallocations, tracking 3-88
Debug menu 1-16
Debug toolbar 1-16
debugger
accessing 1-16
breakpoints 1-21
Debug toolbar, buttons 1-16
debugging/run-time preferences 1-18
described 1-3
overview 1-15
run-time preferences 1-19
using 1-16
debugging preferences 1-18
declarations in the (general) (declarations)
section 2-73
DeleteRecord business component
method 3-106
disconnecting client from the server 3-74
documentation, additional Intro-5
Drilldown applet method 3-29
DTYPE_DATE data type 3-118
DTYPE_PHONE data type 3-117

Version 6.0

E
Edit toolbar 1-12
edit functions of 1-12
EnableExceptions method 2-47, 3-55
EnableOLEAutomation flag 2-25
error code
returning last 3-187
returning most recent 3-119
error handling
differences among the interfaces 2-45
enabling and disabling native COM 3-55
error message tracking 2-45
error notification 1-5
error text message, returning last 3-120,
3-188
event method syntax 2-75
events
BusComp 2-81
determining firing order 2-80
and extension events 2-75
object interface 2-75
object interface table 3-19
outcome of 2-76
and Thin Client interfaces 3-21
user interface control 2-82
exception handling, CORBA 2-47
ExecuteQuery business component
method 3-107
ExecuteQuery2 business component
method 3-110
exporting data 1-6
extension events and events 2-75
extension routine 1-6
external applications
integrating 1-6
launching 1-6
logging 3-70
using ActiveX interfaces 2-8
using CORBA interfaces 2-11

Siebel Object Interfaces Reference

Index

F
field value
returning 3-115
returning in local format 3-117
fields, deactivating current 3-105
FindActiveXControl applet method 3-31
FirstRecord business component
method 3-111
FirstSelected business component
method 3-112

G
GetAssocBusComp business component
method 3-113
GetBusComp business object method 3-186
GetBusObject application method 3-57
GetFieldValue business component
method 3-115
GetFirstProperty
business service method 3-190
GetFormattedFieldValue business
component method 3-117
GetLastErrCode
application method 3-58
business component method 3-119
business object event 3-187
GetLastErrText
application method 3-59
business component method 3-120
business object method 3-188
method, availability 1-25
GetMVGBusComp business component
method 3-121
GetNamedSearch business component
method 3-123
GetPicklistBusComp business component
method 3-124
GetProperty
business service method 3-192

Siebel Object Interfaces Reference

GetSearchExpr business component


method 3-126
GetSearchSpec business component
method 3-127
GetSharedGlobal application method 3-62
GetUserProperty business component
method 3-128
GetValue
control method 3-229
GetViewMode business component
method 3-129
global procedures, simulating 2-18
global state properties/functions 2-70
global variables
overview 2-73
shared 3-62
GotoApplet application method 3-63
GoToControl applet method 3-33
GotoView application method 3-64

I
importing data 1-6
InputBox application method 3-66
instantiating
ActiveX Application Control 2-53
business objects 3-57
Siebel COM Automation Server 2-48
Siebel COM Data Server 2-50
integrating an external application
with Siebel applications 1-6
inter-application variables 2-74
interface and method table 3-8
interface methods 2-3
interface objects, custom behavior 1-5
InvokeMethod
applet method 3-34
application method 3-68
business component method 3-130
business service method 3-193
Web applet method 3-235

Version 6.0

Index

Version 6.0

languages. See Siebel programming


languages
last error code, returning 3-58
last error text message, returning 3-59
LastRecord business component
method 3-132
launching an external application 1-6
list columns
rendering on a Web page 3-242
LoadObjects application method 3-69
local variables 2-72
locating objects method 2-63
login differences among the interfaces 2-41
login ID, returning 3-72
Login method 2-41, 3-70
login name, returning 3-73
LoginId 2-70, 2-71
LoginId application method 3-72
LoginName application method 3-73
Logoff application method 3-74

Name
applet method 3-36
business component method 3-133
business object method 3-189
business service method 3-195
control method 3-230
Web applet method 3-236
named field value, assigning 3-143, 3-145
naming conventions 1-24
navigating
to the Drilldown object view 3-29
methods 2-69
overview 2-69
navigation methods 2-69
NewRecord business component
method 3-134
NextRecord business component
method 3-136
NextSelected business component
method 3-137

manipulating controls, overview 2-70


many-to-many relationship, creating 3-101
maximum script size 1-12
Me object reference 1-25
menus
Debug 1-16
debugging preferences 1-18
run-time preferences 1-18
message box, displaying 3-75
methods
and interfaces table 3-8
Microsoft Excel, launching 3-247
module variables, overview 2-72
moving to last record 3-132
moving to next record 3-136
MsgBox 2-69
MsgBox application method 3-75
MVG business component, returning 3-121

object interface events 2-75


object interfaces
described 1-3
global state properties and functions 2-70
tracing 2-74
user interaction 2-69
variable scoping and 2-72
Object List Editor 1-10, 1-13
object name
returning for a control 3-230
returning for a web applet 3-236
object types
application 2-16
business component 2-17
business object 2-16
and object iterfaces 2-21
property set 2-19
Web applet 2-20
objects, destroying 1-27, 1-30

Siebel Object Interfaces Reference

Index

operating currency code, returning 3-54


ORB, Orbix
initializing 2-58
ORB, Visibroker
initializing 2-60

P
parent applet object, returning for
control 3-224
parent business component,
returning 3-138
ParentBusComp business component
method 3-138
Pick business component method 3-139
Pick business component, returning 3-124
PositionId application method 3-79
PositionName application method 3-80
PostChanges applet method 3-37
preferences, run-time 1-18, 1-19
PreInvokeMethod application event 3-94
PreInvokeMethod events 2-76
PreviousRecord business component
method 3-141
program flow
controlling 2-76
programming
and upgrades 1-2
when to use 2-4
properties
global state 2-70
properties and functions, global state 2-70
property set object type 2-19
PropertyExists
business service method 3-196

Q
queries
clearing current 3-104
refining 3-142
sorting specifications 3-104, 3-154

Siebel Object Interfaces Reference

R
record
adding new 3-134
committing database changes 3-161
moving to first 3-111
moving to last 3-132
moving to next selected 3-137
moving to previous 3-141
picking currently selected 3-139
removing current 3-106
reversing uncommitted changes 3-160
RefineQuery business component
method 3-142
RemoveProperty
business service method 3-197
run-time engine, invoking 1-23
run-time errors
trapping 1-25

S
script editor
accessing 1-9, 1-11
illustration of 1-10
overview 1-3
script editing preferences 1-13
using 1-10
Scripted flag 1-13
ScriptingDLL 1-7
scripts
maximum size of 1-12
search expression
returning current 3-126
setting entire 3-148
search specification
returning 3-123, 3-127
setting 3-147, 3-150
SetFieldValue business component
method 3-143
SetFormattedFieldValue business
component method 3-145
SetNamedSearch business component
method 3-147

Version 6.0

Index

SetSearchExpr business component


method 3-148
SetSearchSpec business component
method 3-150
SetSharedGlobal application method 3-82
SetSortSpec business component
method 3-154
SetUserProperty business component
method 3-156
SetValue
control method 3-233
SetViewMode business component
method 3-157
ShowStatus application method 3-84
Siebel 1-9, 1-22, 1-25
Siebel Applet Designer, function 1-5
Siebel Application Factory object 2-20
Siebel applications, caution when
extending 2-4
Siebel BusComp events 2-81
Siebel Business Object Interfaces
methods overview available for 2-62
Siebel COM Automation Server
accessing 2-7
accessing with Microsoft Visual
Basic 2-48
instantiating 2-48
Siebel COM Data Server
accessing 2-6
accessing with Microsoft Visual
Basic 2-51
instantiating 2-50
Siebel constants table 3-23
Siebel CORBA interfaces
accessing 2-41
business objects, accessing 2-11
Siebel eScript 1-28
about 1-2
configuring Siebel Tools for 1-7
File menu options 1-11
syntax conventions 2-24
this object reference 1-28
tools 1-11

Version 6.0

Siebel Extension events 2-75


Siebel Integration Manager, exchanging
data 1-6
Siebel Object Interfaces
locating object method 2-63
overview 2-62
Siebel Object List Editor 1-13
Siebel programming environment
components of 1-3
Siebel programming languages
data manipulation capabilities 1-4
launching applications 1-6
non-supported uses 1-4
Siebel eScript 1-3
Siebel VB 1-3
supported uses of 1-4
and third-party software 1-6
visibility rules in 1-5
Siebel Script Editor 1-10
described 1-3
using 1-10
Siebel Support Web Intro-6
Siebel Systems, Inc.
contacting Intro-7
technical support Intro-6
Siebel thin clients
events and methods 3-18, 3-21, 3-22
interfaces and methods 3-14??
scripting in 1-7
Siebel Tools 1-7, 1-8
configuration 1-2
Siebel VB
about 1-2
compilation order considerations 1-23
components of 1-3
Edit toolbar of 1-12
File menu options 1-11
getting started 1-24
supported uses of 1-4
syntax conventions 2-23
tools of 1-11
Siebel VB Compiler and Run-time
Engine 1-23

Siebel Object Interfaces Reference

Index

Siebel VB Debugger
described 1-3
variable window of 1-22
Siebel VB Language 1-3
sorting specification, setting 3-154
specialized methods, calling 3-68, 3-130
sscfbas.dll 1-7
sscfjs.dll 1-7
SuppressNotification business component
method 3-159
syntax checking 1-20

T
temporary files
sbx files 1-23
theApplication method 3-249
thin client
interfaces and methods 3-14
Thin clients, interfaces and methods 3-14
this object reference in Siebel eScript 1-28
toolbars
Debug 1-16
Siebel Script 1-12
Trace 2-74
Trace application method 3-85
trace file message, appending 3-85
TraceOff 2-74
application method 2-74, 3-87
TraceOn 2-74
application method 2-74, 3-88
tracing, turning off 3-87
typographic conventions 2-22

user interface updates


AllowNotification method 3-100
disabling 3-159
user prompts, setting 3-66
user property value
returning 3-128
setting 3-156

V
value of a control, returning 3-229
Variable 1-22
variables
availability 2-50
declaring 1-24
local 2-72
scoping 2-72
view, activating 3-64
visibility mode, returning current 3-129
visibility rules 1-5
visibility type, setting 3-157

W
Web applet object type 2-20
scripting 2-20
WebApplet_InvokeMethod event 3-237
WebApplet_PreInvokeMethod event 3-238
WebApplet_ShowControl event 3-239
WebApplet_ShowListColumn event 3-242
Window 1-22
WriteRecord business component
method 3-161

U
UndoRecord business component
method 3-160
user interaction methods 2-69
user interface control events 2-82
user interface control object type 2-19

Siebel Object Interfaces Reference

Version 6.0

You might also like