I have created a new extra-field with code “prov2”, with the help I got on [SOLVED] How can I populate a dropdown extra-field options with the third parties names?
The extra-field options is populated from the Database table “societe”, with the code: societe:nom:rowid
The extra-field works like a charm in the form and allows the user to select an option from the dropdown, and saves the “ID” in the field.
This causes the “ID” to appear in the document template when I try something like in this Screenshot:
Now I am attempting to use the extra-field to show the actual third party name, instead of the number. I am using the next code to populate the custom field.
societe:nom:nom
This code invokes the “societe” table, and requests the “nom” field for the dropdown options and the data to be saved, the third party’s name instead of the ID. This works as expected.
I want to know if I can print the third party name in the document template, with using the third party id I got from the first intent, instead of saving the third party name in the field.