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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Issue with Xrm.Navigation.openFile - This attachment can not be opened on your device

(0) ShareShare
ReportReport
Posted on by 35

Hi,

we have issue with Xrm.Navigation.OpenFile.When I tried download anntation ther is error error = {errorCode: 2147873292, message: "This attachment can not be opened on your device.", code: 2147873292}. So, I tried to download simple base64 text "Man" as text/plain and there is still same error.

var file = {
                                    fileContent: 'TWFuIA==',
                                    fileName: 'test.txt',
                                    fileSize: 1,
                                    mimeType: 'text/plain'
                                };

                                Xrm.Navigation.openFile(file, 2).then(
                                    function(){
                                        console.log("Dialog was closed");
                                    },
                                    function(error){
                                        console.log("error: " + error);
                                    });

Could you help me?

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    The code looks OK, so the issue may be with the settings on your device, as they may block file downloads

  • Suggested answer
    Vit Lachner Profile Picture
    35 on at

    Hi,

    sry, for my late answer to previous post. I have mistake in my code"

    bad: Xrm.Navigation.openFile(file, 2)

    correct: Xrm.Navigation.openFile(file, {openMode : 2 })

    Thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans