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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard