Dynamics 365 allows bulk import of data from an Excel/CSV file. This option is easily accessible on Home Grid for both system and custom entities.
However, many a times, some entities may never have a Home Grid. i.e.: Some entities may be a child of some parent entity and may end up only being displayed as a Sub Grid on the parent entity record.
Dynamics 365 does not provide the Import options on the Sub Grid. Fortunately, it is possible to customize the Sub Grid to add a custom button and invoke the OOB import functionality.
Since we are invoking the OOB Import Excel functionality there is no need to create any custom command.
Navigation Steps:
Step 1: First step to Import Excel/CSV is to use the ‘Ribbon Workbench’ tool to add a new button on the entity Sub Grid.
Create Two Ribbon Buttons one for “Import From Excel” and another for “Import From CSV”.
Step 2: Enter Button Label and for Import From Excel Add Simply populate the ‘CommandCore’ property with ‘Mscrm.ImportDataFromExcel’ and you good to go. Set the ‘CommandCore’ property to ‘Mscrm.ImportDataFromCSV’ if you plan to use the CSV approach.
Step 3: Import From CSV Set the ‘CommandCore’ property to ‘Mscrm.ImportDataFromCSV’.
4th Step: Here is how the button looks on the actual sub grid which is as below.
Step 5: Enter Data that to be Imported in Dynamics 365 and Save it as Excel file.
Step 6: Navigate to Subgrid then Click on Ellipse à Select Import from Excel.
7th Step: Choose the Required file that to be imported and then click on Next Button to Proceed.
Step 8: Click Finish Import to Complete the Process.
9th Step: Click on Confirm Button for Submitting Data.
Step 10 : Click on Refresh to View the Imported data.