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.

PropertyTypeDescription
recordIdStringThe unique 15 or 18-character Salesforce record ID
objectTypeStringThe API name of the Salesforce object type
iconUrlString?Optional URL for the record's icon image
iconColorString?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
MethodSignatureDescription
initinit(recordId:objectType:iconUrl:iconColor:displayFields:fields:fieldmap:)Creates a new record representation
getValueForFieldAPIfunc getValueForFieldAPI(_ String) -> Any?Retrieves a field value using the Salesforce API field name with relationship traversal support
getValueForMappedFieldfunc getValueForMappedField(_ String) -> Any?Retrieves a field value using a mapped field name