OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

IsSetSupported not reliable #1287

Closed aymen-kammoun closed 6 months ago

aymen-kammoun commented 4 years ago

Message from office-js bot: We’re closing this issue because it has been inactive for a long time. We’re doing this to keep the issues list manageable and useful for everyone. If this issue is still relevant for you, please create a new issue. Thank you for your understanding and continued feedback.

I am developping an addin for our customers and I'm testing with an Exchange 2013 account with office web app. I need to get the body of emails and appointments (in read mode) : if (Office.context.requirements.isSetSupported('Mailbox', '1.3')) { // use Office.context.mailbox.item.body.getAsync to get the body } else { // use Office.context.mailbox.makeEwsRequestAsync to get the body } The issue is that Office.context.requirements.isSetSupported('Mailbox', '1.3') returns true while body is undefined.

Expected Behavior

Office.context.requirements.isSetSupported('Mailbox', '1.3') should return false when using an Exchange 2013 account.

Current Behavior

Office.context.requirements.isSetSupported('Mailbox', '1.3') return true when using an Exchange 2013 account.

Steps to Reproduce, or Live Example

Not possible with Outlook Addin.

Context

Your Environment

Useful logs

exextoc commented 4 years ago

Thanks for reporting this issue regarding IsSetSupported API. It has been put on our backlog. We unfortunately have no timelines to share at this point

exextoc commented 4 years ago

Internal tracking id: OutlookWeb: 90648

cattermo commented 4 years ago

I have similar problem with isSetSupported("PdfFile") returning true on Word on iPad. The documentation says clearly that it is not supported https://docs.microsoft.com/en-us/javascript/api/office/office.document?view=word-js-preview.

exextoc commented 4 years ago

@cattermo I checked on the issue described in this thread and it only impacts isSetSupported in OWA on Exchange 2013. Could you please open a new issue for the behavior in Word on iPad? This will help us get the issue to the right people to investigate.

If you think the issue is purely documentation-related, you can optionally use the Feedback link on the bottom of the documentation to open an issue over in office-js-docs-reference.

ElizabethSamuel-MSFT commented 2 years ago

I have similar problem with isSetSupported("PdfFile") returning true on Word on iPad. The documentation says clearly that it is not supported https://docs.microsoft.com/en-us/javascript/api/office/office.document?view=word-js-preview.

@cattermo Thanks for asking about this and for opening issue https://github.com/OfficeDev/office-js/issues/1391. We verified that PdfFile is actually now supported in Word on iPad and so your problem is unrelated to the original issue reported here. We're updating the documentation in PRs https://github.com/OfficeDev/office-js-docs-pr/pull/3068 and https://github.com/DefinitelyTyped/DefinitelyTyped/pull/57065.

Thanks.