Hello All,
I am trying to create an event in Office365 group calendar, below is the line of code
Office365Groups.CreateCalendarEvent(Dropdown2.Selected.id,"asd",DatePicker1.SelectedDate,DatePicker2.SelectedDate)
I am getting an error on dates as below :
Invalid argument type (Date). Expecting a record value instead.
Why it is not taking the date value as the filelds are startdate and enddate for the calendar?
It is working fine while creating an event in personal calendar.
Thanks in advance..!!
Solved! Go to Solution.
Hi @Parth,
Could you please share a screenshot of your app's configuration?
I have made a test, the issue is confirmed on my side. I think there is something wrong with the formula that you provided within your app.
The standard formula format of the Office365.CreateCalendarEvent() function as below:
Office365Groups.CreateCalendarEvent( groupid, subject, start, // it is required to fill a record rather than a date time end, // it is required to fill a record rather than a date time { body, // it is required to fill a record rather than a Text string location, // it is required to fill a record rather than a Text string importance, isAllDay, isReminderOn, reminderMinutesBeforeStart, showAs, responseRequested } )
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the Button control to following formula:
Office365Groups.CreateCalendarEvent(
Dropdown1.Selected.id,
"PowerApps Test Evemnt",
{dateTime:DatePicker1.SelectedDate,timeZone:DateTimeZone.Local},
{dateTime:DatePicker2.SelectedDate,timeZone:DateTimeZone.Local}
)
Best regards,
Kris
Hi @Parth,
Could you please share a screenshot of your app's configuration?
I have made a test, the issue is confirmed on my side. I think there is something wrong with the formula that you provided within your app.
The standard formula format of the Office365.CreateCalendarEvent() function as below:
Office365Groups.CreateCalendarEvent( groupid, subject, start, // it is required to fill a record rather than a date time end, // it is required to fill a record rather than a date time { body, // it is required to fill a record rather than a Text string location, // it is required to fill a record rather than a Text string importance, isAllDay, isReminderOn, reminderMinutesBeforeStart, showAs, responseRequested } )
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the Button control to following formula:
Office365Groups.CreateCalendarEvent(
Dropdown1.Selected.id,
"PowerApps Test Evemnt",
{dateTime:DatePicker1.SelectedDate,timeZone:DateTimeZone.Local},
{dateTime:DatePicker2.SelectedDate,timeZone:DateTimeZone.Local}
)
Best regards,
Kris