AI-Agent-First Documentation
Prompt your Agent: "Query and mutate records on the 'role' table (ID prefix 'role_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."
Role (role)
Used to define the users role in the organization. This determines the records they will have access to via the sharing system
Python SDK & PlatformContext Example
# 1. Query role via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM role ORDER BY created_date DESC LIMIT 25")
# 2. Create role record (Generates 'role_...' Base62 ID)
created = await platform.records.create("role", [
{"name": "Example Role"}
])| 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 |
| parent_role | stringlookup | → role (string ID) | Parent Role | |
| view_access | stringenum | — | required | View Access |
| edit_access | stringenum | — | required | Edit Access |
| delete_access | stringenum | — | required | Delete Access |
| shared_with | listsharing | — | system | Shared With |
