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

Failed to set empty bcc with bcc.setAsync on office web #2925

Closed otisyuan789 closed 5 months ago

otisyuan789 commented 1 year 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.

Provide required information needed to triage your issue

On Edge/Chrome browser, , failed to set empty bcc to remove all recipients with bcc.setAsync on office web

Notes: Only on office web have this issue, it works well on client side.

Your Environment

Expected behavior

Remove the useless bcc recipient by Office.context.mailbox.item.bcc.setAsync([],console.log);

Current behavior

We can get a success response through that api, but the bcc recipients still on there

Steps to reproduce

  1. Open addin
  2. Insert some bcc recipients
  3. Remove all bcc recipients with bcc.setAsync([]) to remove all bcc recipients

Link to live example(s)




Provide additional details




Context

Useful logs

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.

jacifkusto commented 1 year ago

We have the same issue with the To, Cc, Bcc fields. We've also tried Office.context.mailbox.item.to.setAsync([],console.log). The To, Cc, Bcc fields are cleared after calling this method but the Web interface is not updated and shows the one of the recipients in the field.

femkemarije commented 1 year ago

We also have the same issue. Empty array does not "remove" all recipients in the field(to/cc/bcc) anymore. When provided with at least one recipient in the array, it does work as expected.

stefanoslig commented 1 year ago

Hi @exextoc! Any update regarding this issue?

rickgoud commented 1 year ago

Hi @ElizabethSamuel-MSFT and @exextoc . Indeed also very much hoping on an update! Thanks!

exextoc commented 1 year ago

Apologies for late reply on this. We somehow missed looking at this issue.

We tried reproducing this issue by setting 3 recipients in "Bcc" field and then running following code from add-in. This code was able to remove all recipients from 'Bcc' field successfully.

Office.context.mailbox.item.bcc.setAsync([], function(asyncResult) {
  if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
    console.log("Succeeded in setting Bcc field.");
  } else {
    console.error(asyncResult.error);
  }
});

Question: Can you please share video from "Outlook Web" running this add-in code and then showing "Bcc" field is not getting updated?

DmitryKostochko commented 1 year ago

@exextoc, sorry, but I cannot reproduce this issue anymore. It seems to have been fixed. Thank you.