> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/sharepoint-security-sync/features/file-image-column-miration.md).

# 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.

{% hint style="info" %}
**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.
  {% endhint %}

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.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FDMnaZxtoP4lUey6PJ8zX%2Fimage.png?alt=media&amp;token=f3cee996-a3fc-42a2-a267-a1f5bb5926df" alt=""><figcaption></figcaption></figure>

3. Click **+** **New column**.
4. In the New column properties pane:

* Enter **Passport Document** in the Display name field.
* Set the Data type to **File**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fyd5RnPv3G9Q0wRoBfUQZ%2Fimage.png?alt=media&amp;token=b435d4f0-1478-4fa8-abc0-4e5e6d2f7c16" alt=""><figcaption></figcaption></figure>

5. Click **Save**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FehL4pAZ1724C0Cjz6ySv%2Fimage.png?alt=media&amp;token=715d6407-218b-4041-ab50-2aab2e0138e3" alt=""><figcaption></figcaption></figure>

### 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**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FAEkpGRZlKZ9qXXFxfEpg%2Fimage.png?alt=media&amp;token=11f8fe63-4e15-49e9-b480-8d13f7f42217" alt=""><figcaption></figcaption></figure>

3. 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.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FCgEayQI9prw1fEtq40t5%2Fimage.png?alt=media&amp;token=5f0013ad-19d1-41d9-b5ad-3c645fb6a8b3" alt=""><figcaption></figcaption></figure>

3. In the **File and Image tab**, navigate to the **Personal Details** section.
4. Add both the **Passport Document** and **Passport Document Link** fields to this section.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F3o87cKO1nMRwScaUE5nG%2Fimage.png?alt=media&amp;token=b52d0a9b-6d80-4df3-9f99-1b8d6497be77" alt=""><figcaption></figcaption></figure>

### 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**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F3T3j3LrCFMPuMPyDu8xl%2Fimage.png?alt=media&amp;token=c4effcad-c066-45d0-bb19-92a9cc69f5dd" alt=""><figcaption></figcaption></figure>

3. Click **Get more components**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FfmifGRx5nN6IUJB1oAhX%2Fimage.png?alt=media&amp;token=3a3dd947-ce21-409a-8b6d-9629c1e71c25" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FTpmu3Eck8QjDFrOSKbwS%2Fimage.png?alt=media&amp;token=92c1ebff-d5f3-4d5c-a807-2789dd8a8b60" alt=""><figcaption></figcaption></figure>

### 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.

{% hint style="info" %}
**Note**: This must be the logical name of the File or Image column, not its display name.
{% endhint %}

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F0QFuqvXlD6H0FjpMurAN%2Fimage.png?alt=media&amp;token=09af1ab3-69b6-4014-bd17-d75c1fd1067f" alt=""><figcaption></figcaption></figure>

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

2. Ensure the component is enabled for **Web, Mobile, and Tablet**.
3. Click **Done**.

### Step 6: Save and Publish

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F1N3uqzWjVtDA2aInXLM4%2Fimage.png?alt=media&amp;token=2f34eaaa-6062-4d8e-bc6e-cd4518d45675" alt=""><figcaption></figcaption></figure>

### 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**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FHizNIhA0qHuzO13uS2a3%2Fimage.png?alt=media&amp;token=745f9648-66b0-4c79-b213-128681b69d66" alt=""><figcaption></figcaption></figure>

7. Click **Save Config**.
8. 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**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FqQs5JCBBmhU5jK0JVAu0%2Fimage.png?alt=media&amp;token=cf40ef9d-9f79-42a7-a850-588028400680" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FCrweVNzqI8ksicJuOO8S%2Fimage.png?alt=media&amp;token=90cf3a2b-850a-4dd6-8879-d7dbe577c315" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fdb2nfjEowd1peazQNlnR%2Fimage.png?alt=media&amp;token=de4ae3d9-3a8b-4330-ab1c-8cf972ebcd5c" alt=""><figcaption></figcaption></figure>

### 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**.

{% hint style="info" %}
**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.
{% endhint %}

#### Step 1: Initial Upload

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FvPxJNnUNvtH7tI9Y1qm4%2Fimage.png?alt=media&amp;token=97b1c633-55eb-4e81-9f56-1a1c4eb84eb0" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FXjd5aAHU4SWRogGjAxRl%2Fimage.png?alt=media&amp;token=63a38e14-1eb3-4210-85fc-635932ee86b4" alt=""><figcaption></figcaption></figure>

#### 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**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FmZu9BVWYT1Dhz0U0rMUz%2Fimage.png?alt=media&amp;token=35f9f1cb-fba7-4eec-8b02-4e28f1714e1a" alt=""><figcaption></figcaption></figure>

5. 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**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fmm99hYwgl29wCpkDQM2F%2Fimage.png?alt=media&amp;token=848736c6-371a-49d4-951e-18c0189d1819" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FzK7MOjFG1yO1O2hreFpA%2Fimage.png?alt=media&amp;token=18187628-d939-48f4-beb5-58a47ca08f70" alt=""><figcaption></figcaption></figure>

[***Click here***](https://docs.inogic.com/sharepoint-security-sync/features/bulk-migration-job) ***to know more about Bulk Migration Job.***
