Using custom fields in Dynamics 365 for Finance and Operations
When you configure a recurring data job in Dynamics 365, you import a ZIP file that contains standard fields required by the integration. If your solution uses additional custom header fields or line fields that you have created in Dynamics 365, you must modify the contents of the default ZIP file to include those fields and use the modified ZIP file instead.
Modifying the default ZIP file
To modify the default ZIP file:
-
Download the appropriate ZIP file and extract its contents.
-
Use d365-import-data-template.zip if you use Vendor invoice document attachment V1.
-
Use d365-import-data-template-v2.zip if you use Vendor invoice document attachment V2.
Make sure the Use Vendor invoice document attachment V1 setting corresponds to your version.
-
- Open Vendor invoice header.xml in a text editor to specify any custom header fields your solution required. Similarly, you can open Vendor invoice line.xml to specify custom line-item fields.
-
Add your custom header field to the VENDORINVOICEHEADERENTITY element as demonstrated in the example below, where
<MYCUSTOMFIELD/> represents a custom field that you have already specified in Dynamics 365.
<?xml version="1.0" encoding="utf-8"?> <Document> <VENDORINVOICEHEADERENTITY> <HEADERREFERENCE/> <CURRENCY/> <DATE/> <DUEDATE/> <INVOICEACCOUNT/> <INVOICEDATE/> <INVOICENUMBER/> <VENDORACCOUNT/> <SALESTAXGROUP/> <MYCUSTOMFIELD/> </VENDORINVOICEHEADERENTITY> </Document>
- Save your changes and complete the procedure for creating a recurring data job.