Update Affected Templates
After replacing reports with queries and adding them to the Composer solution using aliases, the final step is to update affected templates.
Reports and queries retrieve different values (reports retrieve Field Labels, while queries retrieve the API Name of the field along with the object prefix), which is why you must update any templates that contain merge fields from the reports you replaced with queries. This is as easy as copying the new merge fields from the Template Builder and pasting them into your template.
Follow the steps below to complete this task.
Identify Affected Templates and Locate New Merge Fields
Update Template
There are several options for updating the merge fields in your template. If the data is in a table, as in our example, it might be easiest to replace the entire table using the Template Builder. You can also replace merge fields one at a time if you do not want to re-create the entire table. This is the approach we will take in our example.
To update the template, we will use the same techniques used when building templates with the Template Builder. Follow the steps below.
Update the Conga Template Record
Finally, upload the new template to the same template record. This will prevent you from having to update the button URL because the &TemplateId parameter can continue to reference the same Id.
Follow the steps below to complete this final task.
You do not need to delete the old template because Composer will automatically use the newest attachment on the record. However, you can delete it if you like. You have now converted your reports to queries. Run the Composer solution one more time to confirm everything looks correct with the new query and the new template.