I am using DuplicateResult Class to capture and display duplicate records. I am using this code snippet from the documentation: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Datacloud_DuplicateResult.htm My question is, what indicates what fields from the Contact object are included the matchRecord array? Is it the duplicate rules that define the fields for the query? I am attempting to add additional fields from the Contact object but get an error:
SObject row was retrieved via SOQL without querying the requested field: Account.State