Certain features related to XML generation can be enabled through the Salesforce Configuration.
Automatically attach all attachments to the electronic invoice
When you enable the AutoAttachNotesAndAttachments option (configuration below), all documents saved in “Notes and Attachments” since the original invoice was entered will be automatically included as BT-125 files (in Base64 format) and attached to the generated XML electronic invoice.
This does not apply to previously generated XML e-invoices.

Include BT codes in the electronic invoice
By enabling the IncludeXmlBusinessTermComments option (configuration below), for each electronic invoice generated, each data field will display the corresponding BT code (shown in green in the example below). This visual element does not invalidate the files; it is simply a visual aid to help you with your testing.


Enable options
Go to ‘Custom Metadata Types’, then click ‘Manage Records’ on the ‘EInvoicing Setting’ type:

You will then see a list of configurable options. To enable or disable an option, click ‘Edit’

Change the parameter’s status using the ‘Active’ checkbox, then save your changes.
