cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Error when adding a Calendar event to Outlook

I have an app that has the function to add a calendar event to Outlook. The problem is, while adding the event works for me, it always gives an error and is not working for all users. Here is the code for the button that adds the event:

 

Office365Outlook.CalendarPostItem(ComboBox3.Selected.Name;DatePicker1.SelectedDate + Time(Value(Dropdown1.Selected.Value+3); Value(Dropdown1_1.Selected.Value); 0;0);DatePicker1.SelectedDate + Time(Value(Dropdown1.Selected.Value+2); Value(Dropdown1_1.Selected.Value); 0;0); DataCardValue9.Text; {Body: {Content: DataCardValue7.Text & "<br><br>" & Label24.Text & "<br>" & Label24_1.Text; ContentType: "HTML"}; StartTimeZone: "Europe/Helsinki"; EndTimeZone: "Europe/Helsinki"});

 

I added the error message as an attachment.

 

The problem seems to be the Timezone, since the code works perfectly without it. But if I don't put the Timezone in, the time of the event is wrong. I can't seem to find a list of Timezone formats that Powerapps supports. How do I fix this error? I live in Finland.

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: Error when adding a Calendar event to Outlook

Hi @ilied ,

 

You mentioned that when you remove the timezone the event on the calendar is added with the wrong time. This means that the even time is set always 2 hours behind?  Once Helsinki is UTC+2 at the moment.

 

If you use the function Now on powerapps do you get your local time as I do?

 
Highlighted
Frequent Visitor

Re: Error when adding a Calendar event to Outlook

Yes, the time was two hours off if I used Now(). I fixed this, though. Did not change anything in the code, but I enabled some experimental features in the powerapps options. The error message disappeared after that and everything works as it should. 🙂

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,596)