AgentforceRecordRepresentation
struct AgentforceRecordRepresentation
Represents a Salesforce record with its data, metadata, and display configuration.
This structure encapsulates a complete Salesforce record including its field values, display configuration, theme information, and field mapping capabilities. It provides the foundation for displaying record information in various UI contexts throughout the Agentforce SDK.
| Property | Type | Description |
|---|---|---|
| recordId | String | The unique 15 or 18-character Salesforce record ID |
| objectType | String | The API name of the Salesforce object type |
| iconUrl | String? | Optional URL for the record's icon image |
| iconColor | String? | Optional color for visual styling of the record |
| displayFields | [AgentforceListDisplayColumn] | Configuration for how fields should be displayed in list/table views |
| fields | [String: Any] | Complete field data for the record |
| fieldmap | [String: String]? | Optional mapping between display names and API field names |
| Method | Signature | Description |
|---|---|---|
| init | init(recordId:objectType:iconUrl:iconColor:displayFields:fields:fieldmap:) | Creates a new record representation |
| getValueForFieldAPI | func getValueForFieldAPI(_ String) -> Any? | Retrieves a field value using the Salesforce API field name with relationship traversal support |
| getValueForMappedField | func getValueForMappedField(_ String) -> Any? | Retrieves a field value using a mapped field name |