web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating new event for...
Power Apps
Unanswered

Creating new event for Office 365 Groups calendar

(0) ShareShare
ReportReport
Posted on by 14

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..!!

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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:1.JPG

     

     

    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

     

  • HugoOliveira Profile Picture
    3 on at

    Thanks a lot

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard