Check the data returned by getSelectedItemsAsync
, Log the conversationId
to see its structure. It might be an object, so you may need to dig into its properties
Office.context.mailbox.getSelectedItemsAsync((result) => {
if (result.status === Office.AsyncResultStatus.Succeeded) {
result.value.forEach(item => {
console.log(item.conversationId); // Check what’s actually being returned
});
} else {
console.error(result.error);
}
});