You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide required information needed to triage your issue
Office.context.mailbox.item.sessionData.setAsync is undefined on supported Outlook versions
Your Environment
Platform [PC desktop, Mac, iOS, Office on the web]: PC
Host [Excel, Word, PowerPoint, etc.]: Office
Office version number: 16.0.17328.20108 / 16.0.17231.20236
Operating System: Windows
Expected behavior
Office.context.mailbox.item.sessionData.setAsync to exist and work. We use sessionData but have a fallback in case it is not available. We have various checks in place to make sure it works, because we cannot rely on the requirement set checking (proven by this bug again, which would have manifested if we were only checking the requirement set):
functionsessionDataSupported(){constctx=context();constdiags=diagnostics();if(ctx.mailbox.item.sessionData==undefined){returnfalse;}if(isMobile()){// Although sessionData property exists, trying to save will result in Sys.FeatureNotEnabled errorreturnfalse;}// Based on comment at https://github.com/OfficeDev/office-js/issues/2300#issuecomment-1028878708 SessionData is only properly supported on// PC when the version is > 16.0.14701.20290// Only check version number on Windows platformif(diags.platform!==Office.PlatformType.PC){returntrue;}constversionAsNumber=parseInt(diags.version.replace(/\./g,''));returnversionAsNumber>=1601470120290;}
Current behavior
"sessionData.setAsync is not a function" error is thrown
As a workaround to this issue I've added an additional check, as below:
From the first snippet you can also see I've had to do an explicit check for mobile, because sessionData as an object exists, but using any methods just throws. This object is generally problematic and not well defined.
Steps to reproduce
Attempt to use sessionData.setAsync on an affected Outlook installation
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.
The text was updated successfully, but these errors were encountered:
Provide required information needed to triage your issue
Office.context.mailbox.item.sessionData.setAsync
isundefined
on supported Outlook versionsYour Environment
Expected behavior
Office.context.mailbox.item.sessionData.setAsync
to exist and work. We usesessionData
but have a fallback in case it is not available. We have various checks in place to make sure it works, because we cannot rely on the requirement set checking (proven by this bug again, which would have manifested if we were only checking the requirement set):Current behavior
"sessionData.setAsync is not a function" error is thrown
As a workaround to this issue I've added an additional check, as below:
From the first snippet you can also see I've had to do an explicit check for mobile, because
sessionData
as an object exists, but using any methods just throws. This object is generally problematic and not well defined.Steps to reproduce
sessionData.setAsync
on an affected Outlook installationThank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.
The text was updated successfully, but these errors were encountered: