Here’s my 2 part question: Part 1: When faced with a form that has a fasttab that contains a grid table to which the user can add additional columns, how do you find out the underlying field, and table that stores that data? Part 2: Then… how do you find the appropriate Docentric x++ methods and arguements to bring that into your document?
In my current case I’m trying to bring in data that appears to be on the ‘Intercompany free text invoice’ to the FreeTextInvoice DDSP.
This is not specifically Docentric related, but whenever a form control on the UI has a name like “SysGen…” this means that it was added to the form via the form personalization feature of D365FO (link to MS documentation here).
You can find the underlying table just by searching up the table label that is shown in the “Insert columns” form dialog. For example, here it’s “Intercompany free text invoice lines for project”:
To add any field or even record to Docentric you just need to use the addCalculatedField() and addCalculatedChildRecord() methods, these will allow you to add anything you want to the Docentric template.
First you would create a table buffer, then you would populate it in the standard way, by finding the appropriate relation between different tables and then writing the appropriate select statement.
After you have the populated buffer, you would just add the field you want by using the addCalculatedField() method in your extension of the DSP class, either in the extended addDataFieldsForRdpTableRecord() method or in the extended addAdditionalDataFieldsForQueryRecord() method.
An example of adding fields to an RDP based report can be found here, and the same but for query based report can be found here.