web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

read and delete images from sharepoint folder and add into D365 products with x++

(0) ShareShare
ReportReport
Posted on by 5

read and delete images from SharePoint folder and add into D365 products with x++

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,571 Super User 2026 Season 1 on at

    Hi Tamoor,

    What is your exact question? Where exactly do you need help? What are your current attempts and where do you get stuck?

  • huijij Profile Picture
    19,811 on at

    Hi sir,

    Please refer to the old thread about read and save files from/into SharePoint with X++:

    community.dynamics.com/.../how-to-read-and-save-files-from-into-sharepoint-with-x

  • Tamoor Khalid Profile Picture
    5 on at

    Hi Judy,

    Yes I followed this thread, it is working fine for reading and deleting the files.

    but I am unable to createfile using  Microsoft.Dynamics.Platform.Integration.SharePoint.SharePointHelper::CreateFile(proxy,"xxxxxx.sharepoint.com/.../foldername","filename",memoryStream);

  • Martin Dráb Profile Picture
    238,941 Most Valuable Professional on at

    We can't help you in any way if you don't explain your problem. There may be many reasons why you're unable to create a file and we can't know what's happening in your particular situation unless you tell us.

    For example, maybe you get a compilation error or an exception at runtime. Then share the information with us, such as what type of exception it is and what the error message says.

  • Tamoor Khalid Profile Picture
    5 on at

    Hi Martin
    I need to read the file(image) from Sharepoint folder i-e d365_product_images

    (xxxxxx.sharepoint.com/.../d365_product_images ), add that image into Release products in D365 F&O => this is already been achieved.

    Next step is to create same file(image) into another folder on sharepoint  i-e archive_product_images (xxxxxx.sharepoint.com/.../archive_product_images).

    While creating file in archive_product_images, it gives me access denied exception. I am able to access this folder while ready, and shared user has admin access.

    2450.sharepoint.png

  • huijij Profile Picture
    19,811 on at

    There are many scenarios that can prompt one of these messages "Access Denied". The most common cause is that permissions for the user or administrator are configured incorrectly or not configured at all. You can follow the troubleshooting in MS document:

    learn.microsoft.com/.../access-denied-or-need-permission-error-sharepoint-online-or-onedrive-for-business

  • Tamoor Khalid Profile Picture
    5 on at

    hi Judy,

    Thats what I understood when I got this error. But this is not the case, user has full access because I am able to delete files in this folder using code.

    SP.SharePointHelper::DeleteFile(proxy,"xxxxx.sharepoint.com/sites/d365_products_image/archive_product_image",fileResultv1.Name,memoryStream122);

  • Martin Dráb Profile Picture
    238,941 Most Valuable Professional on at

    Does the folder exist?

  • Tamoor Khalid Profile Picture
    5 on at

    yes Martin, this folder does exist.

    folder path "xxxxx.sharepoint.com/sites/d365_products_image/archive_product_image" in this line of code,  

    SP.SharePointHelper::DeleteFile(proxy,"xxxxx.sharepoint.com/sites/d365_products_image/archive_product_image",fileResultv1.Name,memoryStream122);

    does this folder path has the right format?

  • Pirkino Profile Picture
    2 on at
    Hi Tamoor, could you please tell us, did you resolve this problem or not ? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 493

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 413 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 242 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans