Wednesday, 9 July 2025

Add in Excel

To add extended fields to the Price Disc Adm Trans entity in the Dynamics 365 Finance and Operations Excel add-in, you need to extend the underlying data entity and then modify the Excel design to include the new fields. Here's a step-by-step guide: 1. Extend the Data Entity: Identify the Data Entity: The relevant data entity for price/discount journal lines is PriceDiscAdmTrans. This entity is used when you select "Edit in Excel" from the Price/discount journal lines form. Create a Data Entity Extension: Create a new extension for the PriceDiscAdmTrans entity. This allows you to add new fields without modifying the standard entity. Add the Fields: Add your desired extended fields to the extended entity. You can add them to the PriceDiscAdmTrans table or create a new related table and add the fields there, then link them to the entity. Add the Fields to the Entity: Within the entity extension, add the new fields to the entity's data sources, making sure they are included in the Selected Fields list. Compile and Synchronize: Compile and synchronize your extension to make the changes available in the system. Deploy and Build: Deploy the extension and build the application to ensure the changes are reflected. 2. Modify the Excel Add-in Design: Open the Excel Add-in: Open the Price/discount journal lines form in D365, select "Lines", and then click "Edit in Excel". Access Design Mode: In the Excel add-in, click "Design" to enter design mode. Select the Data Source: Find the PriceDiscAdmTrans data source in the list of available data sources. Add Fields: Click the pencil icon to edit the selected fields. In the "Available fields" list, find your newly added extended fields. Select the fields and click "Add" to move them to the "Selected fields" list. Change Field Order: If needed, change the order of the fields in the "Selected fields" list using the "Up" and "Down" buttons. Update and Refresh: Click "Update" to save the changes to the design. Then, click "Refresh" to load the new data and see your extended fields in the Excel sheet. 3. Additional Notes: Consider Data Types: Ensure the data types of your extended fields are compatible with Excel and D365. Labels and Translations: Remember to create appropriate labels for your new fields and consider translations if needed. Permissions: Make sure the users accessing the Excel add-in have the necessary permissions to view and edit the extended fields. Testing: Thoroughly test the changes in the Excel add-in to ensure the new fields are displayed correctly and their data is being handled as expected