简体   繁体   中英

Outlook add-in returns error 5001 when trying to get the "to" values

Since Thursday 8th oct 2020, we started to have issues with getting the to values in our Outlook add-in. Everything happens in the compose view.

Firstly, we have a check every 500 milliseconds to see if the email address has changed so we can update the view:

return item['to'].getAsync((asyncResult) => {
  console.log('res', asyncResult)
  if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
    return failure(Error(asyncResult.error.message))
  }

  return success(asyncResult.value)
})

This method returns in the beginning returns the correct values.

After that, we have a dialog open to create an event and we are trying to get the mail values such as body, to, from, subject etc. Getting the values of subject, from and to is using the same method as mentioned above. But when I am trying to get the values in there, I get the error code: 5001 and the check mentioned above will fail from now and I won't be able to get the to values.

I could reproduce this in the macOS client but we have seen in Sentry that also our windows client users are having the same issue.

This completely stops most of our customers to use our software.

This should be accomplished with the RecipientsChanged event. Subscribe to the event using Office.context.mailbox.item.addHandlerAsync . Calling an API too frequently could result in the calls being throttled, so it is advisable to use the event mechanism instead of polling.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM