cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Issue with "context.navigation.openFile" method

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."
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Issue with "context.navigation.openFile" method

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

 

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

 

hemant 

 

 

 

View solution in original post

3 REPLIES 3
Highlighted
Power Apps
Power Apps

Re: Issue with "context.navigation.openFile" method

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

 

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

 

hemant 

 

 

 

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Issue with "context.navigation.openFile" method

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

Highlighted
Power Apps
Power Apps

Re: Issue with "context.navigation.openFile" method

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

 

hemant

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (9,491)