Record

public struct Record : Decodable

Represents a Salesforce record.

Field values can be accessed via a number of getter methods, depending on the return type, or via a subscript using the field name as a key.

Example

 var record: SalesforceRecord
 //...
 let acctName: String? = record.string(forField: "Name")
 let alsoAcctName: String? = record["Name"]
  • id

    Undocumented

    Declaration

    Swift

    public let id: String
  • Undocumented

    Declaration

    Swift

    public let type: String
  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Undocumented

    Declaration

    Swift

    public func hasField(named field: String) -> Bool
  • Undocumented

    Declaration

    Swift

    public func value<Value>(forField field: String) throws -> Value? where Value : Decodable
  • Undocumented

    Declaration

    Swift

    public subscript<Value>(field: String) -> Value? where Value : Decodable { get }
  • Returns the value for the given field as a String

    Declaration

    Swift

    func string(forField field: String) -> String?
  • Returns the value for the given field as a Date

    Declaration

    Swift

    func date(forField field: String) -> Date?
  • Returns the value for the given field as a URL

    Declaration

    Swift

    func url(forField field: String) -> URL?
  • Returns the value for the given field as an Int

    Declaration

    Swift

    func int(forField field: String) -> Int?
  • Returns the value for the given field as a Float

    Declaration

    Swift

    func float(forField field: String) -> Float?
  • Returns the value for the given field as a Double

    Declaration

    Swift

    func double(forField field: String) -> Double?
  • Returns the value for the given field as a Bool

    Declaration

    Swift

    func bool(forField field: String) -> Bool?
  • Undocumented

    Declaration

    Swift

    func address(forField field: String) -> Address?
  • Undocumented

    Declaration

    Swift

    func subqueryResult(forField field: String) -> QueryResult<Record>?