English
file_attachment
About 188 wordsLess than 1 minute
2025-09-22
Attachment fields are triggered in the field.edit.after stage. At this time, the add action has occurred, but upload has not yet been triggered.
Parameters
| Parameter | Description | Type |
|---|---|---|
| fieldName | api_name of the field that triggered the event | String |
| objApiName | api_name of the object that triggered the event | String |
| dataIndex | dataIndex of the record that triggered the event, used for detail-object data | String |
| changeData | All field data changed by this edit action | Object |
| type | add, add action | String |
| fileInfos | Files that are about to be uploaded | Array |
Return Value
| Parameter | Description | Type |
|---|---|---|
| notTriggerCalUi | Specifies that this calculation/UI event should not be triggered | Boolean |
| extraCalUiParams | Parameters used to customize the upcoming calculation/UI event logic | Object |
| fileInfos | Files returned for upload | Array |
fileInfo properties
| Property | Description | Type |
|---|---|---|
| filename | File name | String |
| ext | File extension | Object |
| size | File size in bytes | Number |
| path | Uploaded images may have a path | String |
| fileId | Only available for cloud-disk files (not guaranteed) | String |
| filePath | Local file path (not guaranteed) | String |
Code Example
Modify files to upload:
{
event: "field.edit.after",
functional: function (pluginExecResult, options) {
let {fileInfos} = options;
fileInfos.splice(0,1);
}
}