Siebel Developer's Reference > Business Component Classes > CSSBCFile Class >
CSSBCFile Methods
This topic describes the methods that are implemented in the CSSBCFile Class. CreateFile Method
The CreateFile method places a copy of an external file into the Siebel File System and attaches it to the current record by updating the relevant fields in the business component. If the value of keepLink is Y, then the link to the external file is stored. Table 11 describes the method arguments for CreateFile.
Table 11. CreateFile Method Arguments
|
|
|
srcFilePath |
string |
The path to the source file. |
keyFieldName |
string |
The name of the <Prefix>FileName field, which stores the name of the file in the Siebel File System. For example, for the Account Attachment business component, this field is AcctsFileName. |
keepLink |
string |
Indicator of whether to keep a link to the external file. Allowed values are Y and N. |
altSrcFileName |
string |
Optional. An alternative filename for the file that is created in the Siebel File System, if it is different from the name of the source file from which it is copied. |
Returns |
The string "Success" is returned if the operation succeeded, else "Error" is returned. |
Origin |
Implemented in CSSBCFile. |
Callable |
From InvokeMethod using:
- Server scripts
- Custom buttons
- Commands
- External Interfaces
|
DeleteFile Method
The DeleteFile method deletes a file in the Siebel File System or an external file. Table 12 describes the method arguments for DeleteFile.
Table 12. DeleteFile Method Arguments
|
|
|
fileName |
string |
The name of the file to be deleted, including its path. |
internal |
string |
Optional. This argument indicates whether the file is an internal file, that is, a file in the Siebel File System. Allowed values are True if the file is an internal file or False if the file is not an internal file. A value of False is assumed if this argument is not provided. |
Returns |
The string "Success" is returned if the operation succeeded, else "Error" is returned. |
Origin |
Implemented in CSSBCFile. |
Callable |
From InvokeMethod using:
- Server scripts
- Custom buttons
- Commands
|
GetFile Method
The GetFile method copies a file in the Siebel File System that is attached to the current record into a temporary directory. The method returns the path to the file in the temporary directory. The temporary directory is defined in the .cfg file for the Siebel application as the value of the TmpDir parameter in the [Siebel] section. This method allows a user to view or edit a file attachment. Table 13 describes the method arguments for GetFile.
Table 13. GetFile Method Arguments
|
|
|
keyFieldName |
string |
The name of the <Prefix>FileName field, which stores the name of the file in the Siebel File System. For example, for the Account Attachment business component, this field is AcctsFileName. |
Returns |
The return value is one of the following:
- The string "Success, outFilePath" if the operation succeeded. OutFilePath is the path to the file that is copied into the temporary directory.
- The string "Error" if the file is not copied successfully to the temporary directory.
- The string "OutOfDate" if the file in the File System is copied to the temporary directory, but that file is not the most recent version of the file. The most recent version of the file was not available in the File System to be copied.
|
Origin |
Implemented in CSSBCFile. |
Callable |
From InvokeMethod using:
- Server scripts
- Custom buttons
- Commands
- External Interfaces
|
Related Topics
PutFile Method
PutFile Method
The PutFile method replaces a file in the Siebel File System that is attached to the current record with a copy of a file in a specific directory. The method updates relevant business component fields. This method is used to update a file attachment. Table 14 describes the method arguments for PutFile.
Table 14. PutFileMethod Arguments
|
|
|
fileName |
string |
The name of a file, with its full path, from which the attached file is updated. |
keyFieldName |
string |
The name of the <Prefix>FileName field, which stores the name of the file attachment in the Siebel File System that is to be updated. For example, for the Account Attachment business component, this field is AcctsFileName. |
Returns |
The string "Success" is returned if the operation succeeded, else "Error" is returned. |
Origin |
Implemented in CSSBCFile. |
Callable |
From InvokeMethod using:
- Server scripts
- Custom buttons
- Commands
- External Interfaces
|
Related Topics
GetFile Method
UpdateSrcFromLink Method
The UpdateSrcFromLink method replaces a file in the Siebel File System that is attached to the current record with an external file to which the replaced file is linked. The method updates relevant business component fields. Table 15 describes the method arguments for UpdateSrcFromLink. This method is used to update a file attachment when the external file to which it is linked is modified.
Table 15. UpdateSrcFromLink Method Arguments
|
|
|
keyFieldName |
string |
The name of the <Prefix>FileName field, which stores the name of the file attachment in the Siebel File System that is to be updated. For example, for the Account Attachment business component, this field is AcctsFileName. |
Returns |
The string "Success" is returned if the operation succeeded, else "Error" is returned. |
Origin |
Implemented in CSSBCFile. |
Callable |
From InvokeMethod using:
- Server scripts
- Custom buttons
- Commands
- External Interfaces
|
Related Topics
CreateFile Method
|