Attachment object
An Attachment object represents a single a file or Internet address attached to a field object and is opened directly.
You get an Attachment object from the Attachments property of an entity object, such as Bug object and Req object.
Public methods
This object supports the following methods.
Method | Description |
---|---|
Posts all changed values into database. Syntax: Call Post after creating or changing an object and before the object is released. Objects are released in many ways, for example: by going out of scope, by ending the connection, or by being explicitly released in your code. |
|
Reads saved values, overwriting values in memory. Syntax: |
|
Rename |
Renames the attachment on the server. The attachment must be uploaded before calling this method. Syntax: Parameter:
|
Undoes changes to field values that have not been posted. Syntax: |
Public properties
This object supports the following properties.
Property | R/W | Type | Description |
---|---|---|---|
AutoPost |
R/W | Boolean |
If true, the database is updated immediately when the field value changes. Syntax: |
Description |
R/W | String |
The attachment description. Syntax: |
Field |
R/W | String |
The value of the specified field. Syntax: Parameters:
|
FieldMultiValue |
R/W | Object |
The MultiValue object of the specified field. See MultiValue object. Syntax: Parameters:
|
FileSize |
R | Number |
The attachment file size in bytes. Syntax: |
ID |
R | Number |
The item ID. Syntax: |
LastModified |
R | Date |
The last modified time. Syntax: |
Modified |
R | Boolean |
Checks if the item has been modified since last refresh or post operation. If true, the field properties on the server side are not up to date. Syntax: |
Name |
R | String |
The attachment name. Syntax: Return: The name of the file that was attached. For example, SampleAttachment.txt. |
Type |
R/W | String |
The attachment type. Either File or URL. Syntax: |
TypeName |
R | String |
The field's type. Syntax: |
Virtual |
R | Boolean |
Checks if this is a virtual item, that is, an item that does not have a corresponding database record. |