Topic
How to configure a SOQL query referencing aggregate and toLabel() fields with Drawloop DocGen
Additional Information
- Drawloop will not populate a <<Tag>> in the Field Tagger for aggregate functions. The instructions below will provide you with the <<Tag>> logic/creation.
- Most commonly used, toLabel().
- The toLabel() field/function needs an Alias inside the SOQL.
- The DocGen SOQL relationship will require a Relationship Alias as well.
Instructions
In the below example, we will be using a Picklist Field where the API name is different than the display value.
1. Add the tolabel() around the desired Salesforce field. Create an alias for the SOQL field.
example: "display"
2. This will remove the value from showing in the developer console, but will still be queried in the DocGen Package as expected.
3. Add this query to the DocGen Package and provide it with an Alias Relationship value.
example: "Translation"
4. The Tag logic will now be: <<RelationshipAlias_SoqlFieldAlias>>.
From the above choices:
- RelationshipAlias = Translation
- SoqlFieldAlias = display
Final output Tag = <<Translation_Display>>