Siebel Developer's Reference > Business Component Classes > CSSBCFile Class >
CSSBCFile Methods
This section describes the methods that are implemented in the CSSBCFile Class. CreateFile
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.
|
|
|
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. |
Invocable |
This method can be invoked through InvokeMethod only. |
DeleteFile
The DeleteFile method deletes a file in the Siebel File System or an external file.
|
|
|
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. |
Invocable |
This method can be invoked through InvokeMethod only. |
GetFile
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. See also PutFile
|
|
|
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. |
Invocable |
This method can be invoked through InvokeMethod only. |
PutFile
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. See also GetFile
|
|
|
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. |
Invocable |
This method can be invoked through InvokeMethod only. |
UpdateSrcFromLink
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. This method is used to update a file attachment when the external file to which it is linked is modified. See also CreateFile
|
|
|
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. |
Invocable |
This method can be invoked through InvokeMethod only. |
|