Apex Class
Apex Class
@AuraEnabled(cacheable=true, userMode=true)
public static Map<String, Object> getRelatedRecords(
Id parentId,
String childObjectApiName,
String relationshipField,
String fieldSetName
) {
Map<String, Object> result = new Map<String, Object>();
result.put('records', records);
result.put('fields', fieldNames);
return result;
}
}