AX – D365FFO – X++ – Export in EXCEL

Microsoft Dynamics 365 for Finance and Operations has several convenient ways to view, edit and publish data. One convenient way is a feature that opens information in Excel. This feature uses some out-of-the-box Excel templates. By using these templates you directly view, edit and delete data from Excel without any additional import/export functionality.

Although there are multiple system defined document templates available, but still they don’t cover all data entities. In this blog we are going to discuss how to create a custom document template.

I’m using Customer group (CustGroup) data entity in this example.

Step 1: Create an excel resource file. Add Customer Group data entity and map your desired fields on it.

Step 2: Add your excel resource file in the project and reference the resource name of this file in your class.

Step 3: Create template registration class. Extend your class to DocuTemplateRegistrationBase, which is a parent class to populate all document templates. Override registerTemplate() method and write following code to add your custom template along with system templates. Build the project.

Step 4: Go to D365O→ Organization administration→ Setup→ Office integration→ Document templates. Click “Reload system templates”. You will see the new template is added to the list.

Similar link will be available from Customer group setup form.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s