AI-Agent-First Documentation
Prompt your Agent: "Query and mutate records on the 'related_file' table (ID prefix 'refi_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."
Related File (related_file)
A related file connects a File Object to any other Object like App, Contact, Record Trigger, etc. The idea is that one File can relate to many different records in the system, so we keep one copy of the File. Then you can relate that file to many other records using a Related File.
Python SDK & PlatformContext Example
# 1. Query related_file via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM related_file ORDER BY created_date DESC LIMIT 25")
# 2. Create related_file record (Generates 'refi_...' Base62 ID)
created = await platform.records.create("related_file", [
{"name": "Example Related File"}
])| Field API Name | Type / Format | Lookup Target | Flags | Description |
|---|---|---|---|---|
| id | string | — | required | Id |
| name | string | — | required | Name |
| created_date | stringdate-time | — | Created Date | |
| modified_date | stringdate-time | — | Modified Date | |
| created_by | stringlookup | → user (string ID) | system | Created By |
| modified_by | stringlookup | → user (string ID) | system | Modified By |
| related_record | stringcompound_lookup | — | required | Related Record |
| file | stringlookup | → file (string ID) | required | File |
| link | stringlink | — | A link to where the file is hosted. It will require fetching through the API if it is a private file to ensure privacy is up held | |
| shared_with | listsharing | — | system | Shared With |
