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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue with "context.na...
Power Apps
Answered

Issue with "context.navigation.openFile" method

(0) ShareShare
ReportReport
Posted on by 15

Did anyone manage to execute successfully the openFile method inside PCF control?

 

I passed a simple file object with all the required fields (fileContent, fileName, mimeType & fileSize) and object with open mode as stated in docs, but I'm always getting the error after execution.

 

Error:

  • Code: 2147746581
  • Message: "An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization's Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support."
I have the same question (0)
  • Verified answer
    Hemant Gaur Profile Picture
    on at

    This API internally uses client API . Quick search I found this article with sample on the web , you can try -

    https://blog.magnetismsolutions.com/blog/dominicjarvis/2018/03/06/how-to-save-files-in-a-supported-manner-using-dynamics-365

     

    else please share the code snippet and I cna have a look. 

     

    hemant 

     

     

     

  • DynamicsNinja Profile Picture
    15 on at

    I feel so dumb now...Base64 encoding was missing in my code

  • Hemant Gaur Profile Picture
    on at

    No worries Ivan, this happens to all of us 🙂 . We resolve issues, unblock and move on. 

     

    hemant

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard