For the complete documentation index, see llms.txt. This page is also available as Markdown.

File & Image Column Migration

The File & Image Column Migration feature allows you to automatically move files uploaded to Dynamics 365 File and Image columns to SharePoint. This helps reduce Dataverse storage usage while keeping documents easily accessible from Dynamics 365.

When a user uploads a file or image to a configured column, SharePoint Security Sync migrates the file to SharePoint and updates the corresponding URL column with a clickable link. Users can continue accessing the document directly from the record, while the file inherits the configured SharePoint folder security.

Note:

  • Before using File and Image Migration, create a corresponding URL column, add the File and Image Control component, and map the URL column to the respective out-of-the-box (OOB) or custom File/Image column in the File/Image Column Configuration tab.

  • Files uploaded through the File and Image Control are migrated automatically when the Attachment Action is set to Move or Copy.

  • If a file is uploaded directly to an OOB or custom File/Image column, or if the Attachment Action is Blank, run a Bulk Migration Job to migrate the file to SharePoint.

The following steps walk through this configuration using the Contact entity as an example.

Step 1: Create a File Column

  1. In the Power Apps interface, select Tables from the left navigation menu.

  2. Select the Contact table and click Columns under the Schema section.

  1. Click + New column.

  2. In the New column properties pane:

  • Enter Passport Document in the Display name field.

  • Set the Data type to File.

  1. Click Save.

Step 2: Create a URL Column

To migrate a File or Image column, a corresponding URL column must be created. This column will hold the hyperlink to the migrated file once it is moved to SharePoint.

  1. Click + New column again to create a second column.

  2. In the New column properties pane:

  • Enter Passport Document Link in the Display name field.

  • Set the Data type to Single line of text.

  • Set the Format to URL.

  1. Click Save.

Step 3: Add the Fields to the Contact Form

  1. Go to Tables > Contact > Forms.

  2. Open the Contact form with Form type Main in the form designer.

  1. In the File and Image tab, navigate to the Personal Details section.

  2. Add both the Passport Document and Passport Document Link fields to this section.

Step 4: Add the Custom Component to the URL Field

  1. Select the Passport Document Link field on the form canvas.

  2. In the properties pane, expand the Components section and click + Component.

  1. Click Get more components.

  1. From the list of available components, select File and Image Control and click Add.

Step 5: Configure the Custom Component

  1. In the Add File and Image Control configuration pane, set the following:

Column Logical Name (File or Image): Enter the logical name of the File or Image column, for example, cree7_passportdocument.

Note: This must be the logical name of the File or Image column, not its display name.

Column Type: file or image: Enter file if the column type is File, or image if the column type is Image.

  1. Ensure the component is enabled for Web, Mobile, and Tablet.

  2. Click Done.

Step 6: Save and Publish

Click Save and Publish in the form designer to apply the changes to the environment.

Configure File & Image Migration in SharePoint Security Sync

After creating the required columns and updating the form, configure the entity in SharePoint Security Sync.

  1. Open SharePoint Security Sync.

  2. Select Entity Configurations.

  3. Open the Contact entity configuration.

  4. Navigate to the File/Image Column Configuration tab.

  5. Locate the Passport Document field.

  6. From the URL dropdown, select Passport Document Link.

  1. Click Save Config.

  2. Save the entity configuration.

Verify the Expected Result

After completing the configuration, verify that the uploaded file has been migrated successfully.

  1. Open a Contact record.

  2. Navigate to the File and Image tab.

  3. Upload a file to the Passport Document field.

  4. Save the record.

After the background migration completes:

  • The uploaded file is moved from Dataverse to SharePoint.

  • The Passport Document Link field is automatically populated with a clickable SharePoint URL using the original file name.

  • The file inherits the configured SharePoint folder permissions.

To verify the migration in SharePoint:

  1. Open the Attach2Dynamics panel for the Contact record.

  2. Confirm that the uploaded file appears in the document list.

  3. Click Open Folder in SharePoint to verify the file location.

Bulk Migration Job

Files uploaded directly to an out-of-the-box (OOB) or custom File/Image column are not migrated to SharePoint automatically. To migrate these files, run a Bulk Migration Job.

Note: Before running the Bulk Migration Job, ensure that the File/Image column is mapped to its corresponding URL column in the File/Image Column Configuration tab of the Entity Configuration.

Step 1: Initial Upload

Before uploading a file, the File/Image column is empty.

Step 2: Upload a File

Upload a file to the OOB or custom File/Image column and save the record. The file remains in Dataverse until the Bulk Migration Job is executed.

Step 3: Run the Bulk Migration Job

  1. Navigate to SharePoint Security Sync > Bulk Migration Jobs.

  2. Create a new Bulk Migration Job.

  3. Set Migrate to File and Image.

  4. Set Attachment Action to Move.

  1. Save the job.

Step 4: Verify the Migration

After the Bulk Migration Job completes successfully:

  • The physical file is moved from Dataverse to SharePoint.

  • The mapped URL column is automatically populated with a clickable SharePoint link.

  • You can verify the migration status from the Job Status tab of the Bulk Migration Job record.

Click here to know more about Bulk Migration Job.

Last updated

Was this helpful?