Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Change default option from yes to no on overwrite existing files.

(4) ShareShare
ReportReport
Posted on by 14
Hello, 
 
Is it possible to change the default option from yes to no on the overwrite existing files option when uploading a file to sharepoint in the documents area. 
 
Thanks 
Categories:
  • CU22040745-0 Profile Picture
    2 on at
    Change default option from yes to no on overwrite existing files.

    Yes, it is possible to influence the behavior when uploading files to SharePoint, but SharePoint does not provide a native setting to change the default overwrite behavior (i.e., from "Yes" to "No") directly in the user interface. However, you can manage this through custom solutions or using Power Automate or SharePoint API calls, where you have control over whether to overwrite existing files or not.

    For example, if you're using PowerShell or Power Automate to upload files, you can explicitly set the "overwrite" parameter to false to prevent existing files from being replaced.

    For more details and potential workarounds, you can explore solutions and guides available here

  • CU22040408-0 Profile Picture
    2 on at
    Change default option from yes to no on overwrite existing files.
    I believe that while it is not possible to change the default option, using SharePoint's version control features is a great alternative to prevent accidental data loss and maintain previous versions of documents!
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,336 Super User 2025 Season 1 on at
    Change default option from yes to no on overwrite existing files.
    Hello James2793,
     

    Unfortunately, it is not possible to change the default option from "Yes" to "No" for the "Overwrite existing files" setting when uploading documents to SharePoint through the Dynamics 365 documents area using the out-of-the-box functionality.

    This behavior is hard-coded into the Dynamics 365 platform. The default setting is always "Yes," meaning that if a file with the same name already exists in the SharePoint folder connected to the Dynamics 365 record, it will be overwritten without further prompting beyond this initial dialog.

     

    Why it's likely designed this way:

    • Efficiency: For many users, overwriting is the intended action when uploading a newer version of a document. Making "Yes" the default reduces the number of clicks required in such scenarios.

    • Simplicity: The dialog is kept relatively simple with a clear "Overwrite" option.


    •  

    Possible Workarounds (with limitations and varying levels of complexity):

    While you can't change the default, here are some potential workarounds or strategies to mitigate the risk of accidental overwrites:

    1. User Training and Awareness:

      • Emphasize to users the importance of checking the "Overwrite existing files" option before clicking "OK."

      • Provide clear guidelines on when they should choose "No" (e.g., when uploading a distinct document with a similar name).

      •  

    2. Rename Files Before Uploading:

      • Encourage users to rename their local files before uploading if they want to keep both the existing and the new version. This could involve adding a version number or a timestamp to the filename.

      •  

    3. Leverage SharePoint Versioning:

      • Configure versioning on the SharePoint document libraries connected to Dynamics 365. This is the most robust solution for preserving previous versions of documents.

        • In SharePoint, go to the Document Library settings.

        • Under "Versioning settings," set "Document Version History" to "Create major versions" or "Create major and minor (draft) versions."

        • With versioning enabled, even if a user accidentally overwrites a file through Dynamics 365, the previous version will be retained in SharePoint and can be restored if needed. This doesn't change the default "Yes" in Dynamics 365 but provides a safety net.


        •  

    4. Custom Client-Side Development (More Complex):

      • This would involve creating a custom web resource (JavaScript) that intercepts the file upload action within Dynamics 365.

      • The custom code could potentially:

        • Hide the default "Overwrite existing files" option.

        • Replace it with a custom control (e.g., a dropdown or radio buttons) that defaults to "No."

        • Implement logic to handle the upload based on the user's choice.

        •  

      • Limitations and Considerations:

        • This approach would require significant development effort and expertise in Dynamics 365 client-side customization.

        • It might be affected by future Dynamics 365 updates.

        • It could potentially introduce complexity and might not be fully supported.

        •  
         

    5. Power Automate (Less Direct for Upload):

      • You could potentially build a Power Automate flow that triggers when a file is added to the SharePoint library.

      • The flow could check if a file with the same name already existed before the upload.

      • If it did, the flow could potentially move the newly uploaded file to a temporary location and notify the user to rename it if they want to keep both versions.

      • Limitations: This doesn't prevent the initial overwrite but provides a post-upload mechanism. It also adds complexity to the document management process.


      •  

    6.  

    In conclusion, while a direct setting to change the default "Overwrite existing files" option in Dynamics 365 is not available, the most practical and recommended approach to manage file versions and prevent accidental data loss is to configure and utilize SharePoint's built-in versioning capabilities. This provides a reliable way to track and restore previous versions of documents regardless of the "Overwrite" setting in Dynamics 365.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 136 Super User 2025 Season 1

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 106

Overall leaderboard

Product updates

Dynamics 365 release plans