[ This file is autogenerated from apexdoc ]
AqRecordWithChildren
Represents a record with its child records in a hierarchical structure. Used to maintain parent-child relationships during mapping operations.
Group modules/mapping tool
Overview
AqRecordWithChildren is a wrapper class that represents a Salesforce record along with its child records in a hierarchical structure. It's used throughout the mapping tool to:
- Maintain parent-child relationships during JSON parsing and conversion
- Track parent field values for embedded object hierarchies
- Manage child record collections
- Support hierarchical upsert operations
Usage
Typically returned from mapping operations:
AqResult result = AqMappingToolService.upsertRecordsFromJson(
jsonString,
'AccountMapping',
true
);
if (result.Severity == AqResult.SEVERITY_SUCCESS) {
List<AqRecordWithChildren> records =
(List<AqRecordWithChildren>)result.ReturnValue;
for (AqRecordWithChildren record : records) {
System.debug('Record ID: ' + record.record.Id);
// Access child records
if (record.children != null) {
for (AqRecordWithChildren child : record.children) {
System.debug('Child ID: ' + child.record.Id);
}
}
}
}
Key Fields
record: The Salesforce SObjectchildren: List of child AqRecordWithChildren (for embedded objects)objectDefinitionDevName: DeveloperName of the ObjectDefinitionMappingparentFieldName: Field name that links to parent (for child records)
See the main module documentation for hierarchical structure examples.