# FileReplace

Output payload returned for the file-replaced platform event type.

> Kind: Apex type · Updated: 2026-07-01

This custom Apex type represents the output that Platform Events and the Platform Events Apex Handler return for the file-replaced platform event type. It is populated by Client.getEventDetails() when deserializing a file-replaced event payload.

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | String | optional | Identifier of the replaced file. |
| DriveId | String | optional | Identifier of the drive containing the file. |
| Library | String | optional | Storage library the file belongs to. |
| RecordId | String | optional | Salesforce record the file is associated with. |
| UserId | String | optional | Salesforce user who triggered the replacement. |
| Name | String | optional | File name. |
| ParentFolderId | String | optional | Identifier of the parent folder containing the file. |
