getAllRequestsByParentId
Description: Fetches all requests linked to a specific parent record.
Parameters:
sampleParentId
: ID of the related parent record.relationshipName
: Name of the related parent object. Returns: List of matchingDocuFetchRequestInfo
objects.
// 2. Get All Requests by Parent Object
Id sampleParentId = '001XXXXXXXXXXXXXXX'; // e.g. Account or Case ID
String relationshipName = 'Your_Relationship__r'; // e.g. cg__Account__r
List<cg.DocuFetchRequestInfo> requestsByParent = cg.DocuFetchTools.getAllRequestsByParentId(sampleParentId, relationshipName);
System.debug('Requests by Parent: ' + requestsByParent);