We are facing problems while generating DrawLoop document where custom object records are grouped by custom field. We have requirement where we need to show records of a custom object which are grouped by a custom field and we need to filter records using 13 different criteria. We cannot achieve this using DDP configuration since we can have at max 5 filters using 'Unrelated Data' relationship type.
If we use DDP config approach and add just 5 filters, we are successfully able to group data using custom field and generate DrawLoop document. But as per the requirements, we need to apply 13 different criteria to filter data, we will have to use apex classes approach. But the problem is, we are not able to group data using custom fields when we generate DrawLoop documents with Apex Classes as data source. The DDP run wizard throws error. Now, if we use standard field to group data, everything works as expected. We are not sure if we are missing anything in code or in DDP configuration.