Closed iuri1994 closed 5 months ago
We are unable to repro the issue locally.
We followed the below steps:
Run
to fetch recurrence properties using Recurrence API.Can you share the steps you followed? Does this occur on other Outlook clients (Outlook Desktop, Outlook Mac, Outlook Online (OWA) on other browsers) ?
Hi, I refreshed the file, https://gist.github.com/iuri1994/0c19503bcda03f9727986aa8e0d41af5, this happens in chrome and edge, with firefox the script labs was not working, so I couldn't try it there, in the outlook app it's working. I think the problem is when I use the saveAsync function before the recurrence function.
here is a small video of me testing it with all the steps.
https://www.youtube.com/watch?v=xx9slHmpr0Q&ab_channel=naotensnadaavercomisso
Hello @iuri1994 , not sure we understand your issue completely. Can you please post the recurrence properties that you're receiving and also whats the expected behaviour? We see that in the video you've shared, the recurrence property JSON is coming up, as already communicated before.
Hi, the problem is the function recurrence.getAsync where I am getting a Null value instead of the recurrence values.
But when I use the addHandlerAsync I am getting the correct value.
After a few tests, this only happens when I reproduce these steps.
1 - open a new event (don't fill any field) 2 - open script lab and upload the file I shared ( https://gist.github.com/iuri1994/0c19503bcda03f9727986aa8e0d41af5) 3- click the 'Run' button that appears, the value from the recurrence will be Null because there is no recurrence. 4 - change the recurrence in the event 5 - press the 'Run' button again, the value of the recurrence should take the value from the recurrence field, but it's appearing that the value is Null
Hi, the problem is the function recurrence.getAsync where I am getting a Null value instead of the recurrence values.
But when I use the addHandlerAsync I am getting the correct value.
After a few tests, this only happens when I reproduce these steps.
1 - open a new event (don't fill any field) 2 - open script lab and upload the file I shared ( https://gist.github.com/iuri1994/0c19503bcda03f9727986aa8e0d41af5) 3- click the 'Run' button that appears, the value from the recurrence will be Null because there is no recurrence. 4 - change the recurrence in the event 5 - press the 'Run' button again, the value of the recurrence should take the value from the recurrence field, but it's appearing that the value is Null
Can you please try out the following code snippet for using getAsync in recurrence and test once?
function myCallback(asyncResult) { var recurrence = asyncResult.value; console.log(asyncResult); if (recurrence == null) { console.log("Non-Recurring Meeting"); return; } } Office.context.mailbox.item.recurrence.getAsync(myCallback);
Hello, The code you send me it's the normal code to get the recurrence, with that I can get the recurrence, but that is not the problem here, if you see the code I sent you, you will see that there is the saveasync function before the recurrence function. I tried your code without the saveasync function and it works, if you tried to follow my steps with the function you sent me, but put the saveasync before you will get the error.
if you can't reproduce this we can do a meeting where I could share the screen to show you.
I need the saveasync because it's the only way to get the event id in outlooks that use the older versions of the API, in newer versions I have the getItemIdAsync.
Best regards
I used this following code to test.
Office.context.mailbox.item.saveAsync(function(item) { Office.context.mailbox.item.recurrence.getAsync(function(asyncResult) { // debugger; if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { var recurrence = asyncResult.value; if (recurrence === null) { console.log('recurrence_function',"This is a single appointment."); } else { console.log('recurrence_function',
Recurrence pattern: ${JSON.stringify(recurrence)}); } } else { console.error(asyncResult.error); } }); });
This works for us. First it saves the item (becomes a draft) and then the recurrence value is then shown. I am assuming this is the expectation here right?
Yes, that's the expectation, but for me, it's not working in that way, the recurrence it's not coming with the correct value.
Hey @iuri1994 ,
Apologies for the delay, it took a while to confirm things on our end. We are able to reproduce this issue now, and we have put it in our backlog to fix it. However, there are no timelines we can share at this point.
Hi,
Do you have an estimated time to solve this issue?
Best Regards
Hi, I experience almost the same issue, but saving events doesn't help, and it only plays in Office on the web. osfweb version: 16.0.15201.10000 office-js-api version: 20220404.2
Hi @ArtsiomLysianok: We are not able to repro this issue based on the details you provided. Please open a separate GitHub issue with repro steps so that we can investigate this further. Thanks!
Expected Behavior
When using the Office.context.mailbox.item.recurrence.getAsync I expected to get the recurrence of the event
Current Behavior
I am not getting the recurrence. the value that it's coming is null, it only changes when the event is saved and then reopened. The function Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecurrenceChanged, handler, callback) works perfectly, but in the addin that I am making if the user changes the recurrence before opening the taskpane it's useless
Steps to Reproduce, or Live Example
Your Environment
Useful logs