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

InvokeMethod Methods


Siebel applications provide multiple methods for manipulating files stored in the Siebel File System. These methods may be invoked using server script (Siebel VB, eScript) or using one of our programmatic interfaces (Mobile/Dedicated Web Client Automation Server - connected mode only, COM Data Control, Java Data Bean). The methods available for manipulating the file system always store or retrieve the file to and from the local file system. For example, if you construct a Java client using the Java Data Bean to manipulate the file system, all files must be accessible from the Siebel Server. You can use UNC naming conventions (for example: \\server\dir\file.txt) or standard DOS directories (for example: D:\dir\file.txt) for file access, but the UNC path or mounted file system must be accessible to the Siebel Server. These methods do not serialize the files from a remote client and place them in the Siebel file system.

Methods that manipulate files are available for business components whose Class is `CSSBCFile'. The methods can be accessed using Server Script, Mobile/Dedicated Web Client Automation Server, COM Data Control, and the Java Data Bean.

The following methods are available for use with InvokeMethod.

CreateFile

To create a file in the Siebel file system from an external source, use the business component CreateFile method. Before calling CreateFile, make sure that a new business component record has been created using the NewRecord method for the business component.

Syntax

retVal = BusComp.InvokeMethod("CreateFile", filePath, KeyField, keepLink)

Argument
Description
SrcFilePath
The fully qualified path of the file on the Siebel Server or Mobile Web Client.
KeyFieldName
The name of the field in the business component that contains the File Name. For example: AccntFileName field in the Account Attachment business component.
KeepLink
Applies to URLs. Either Y or N depending on whether a link to the file is stored as an attachment instead of the actual file.

Returns

A string containing the values of "Success" or "Error" depending on whether or not the operation succeeded.

Used With

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

GetFile

Obtains a file from the Siebel file system and places that file on the local file system of the Siebel Server or Mobile Client. Note that you must be properly positioned on the desired file attachment record to get the file and have it placed on the local file system's temporary directory.

Syntax

retVal = BusComp.InvokeMethod("GetFile", KeyField)

Argument
Description
KeyFieldName
The name of the field in the business component that contains the File Name. For example: AccntFileName field in the Account Attachment business component.

Returns

A string containing "Success, <outFilePath>" if the operation succeeded. OutFilePath is the fully qualified path of the file on the Client/Server machine in the user's temp directory. The return value is "Error" if the operation failed.

Used With

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

PutFile

Updates a file in the Siebel file system with a newer file. Note that you must be properly positioned on the desired file attachment record to update the file in the file system.

Syntax

retVal = BusComp.InvokeMethod("GetFile", SrcFilePath, KeyField)

Argument
Description
SrcFilePath
This is the fully qualified path of the file on the Siebel Server or Mobile Web Client.
KeyFieldName
This is the name of the field in the business component that contains the File Name. For example: AccntFileName field in the Account Attachment business component.

Returns

A string containing the values of "Success" or "Error" depending on whether or not the operation succeeded.

Used With

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

SetAdminMode

This method is particularly useful if you need to replicate the behavior enforced by the `Admin' property of the View object by disabling all visibility rules for the business component.

Syntax

retVal = BusComp.InvokeMethod("SetAdminMode", flag)

Argument
Description
flag
"TRUE" or "FALSE". Flag to specify whether the business component should be executed in Admin mode.

Returns

Not Applicable

Used With

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


 Siebel Object Interfaces Reference 
 Published: 18 June 2003