Group Data Using Custom Fields


Hi Team,
 
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.
 

Thanks.


3 replies

Userlevel 4
Badge +8

Hemendra Singh Bhati‌,

You should be able to use our OppLineItemGrouping sample to help you group records together via an Apex Data relationship. I've included our sample below:

http://help.nintex.com/en-US/docgen/docservices/#docgen-sfdc/Services/apex/samples/S_ExternalData_OppLineItemGrouping.ht… 

Cheers,

Ryan

Hi Ryan O'Leary‌,

Thanks for the reply.

We have gone through this apex class. But the problem is, we are not sure on how to use apex data in DDP template and/or how to configure DDP relationships. We tried all possible combinations but we are not able to generate document. Could you please share details on how to configure template and relationships to make this work?

Thanks much. 

Userlevel 4
Badge +8

Hemendra Singh Bhati‌,

Create a new relationship and set the type to Apex Data, select your Apex Data class. All of the objects and fields you created in apex will roll up to the Field Tagger.

Cheers,

Ryan

Reply