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 / Delete Calendar item u...
Power Apps
Answered

Delete Calendar item using event id.

(0) ShareShare
ReportReport
Posted on by 142

I use the following code to create an event in my calendar 

Set(_myCalendarID, LookUp(Office365.CalendarGetTablesV2().value, name = "Calendar").id);

 

Office365Outlook.V4CalendarPostItem(
// lookup user's calendar
_myCalendarID,
// subject of meeting
"Work Space OPP " & workspaceNo & " reserved ",
// The time the reservation started
DateAdd(startTime, TimeZoneOffset(), Minutes),
// The time the reservation ended
DateAdd(endTime, TimeZoneOffset(), Minutes),
//The timezone for the reservation
"(UTC) Coordinated Universal Time",
{Location: "OPP 7/F " & workspaceNo, Importance: "Normal", ShowAs: "Busy"}
);

and use the following code to get the event id and save it to SharePoint list and field name is EventID

Set(_eventID,Last(Sort(Office365Outlook.V4CalendarGetItems(_myCalendarID).value,createdDateTime)).id);

 

When I try to delete the event I use this code. But powerapps was looking for event instead of eventID

Office365Outlook.CalendarDeleteItemV2(_myCalendar, ThisItem.EventID);

 2021-07-06_Delete_Event.jpg

 

How can  I get the event of the calendar item ?

 

Categories:
I have the same question (0)
  • Verified answer
    skong Profile Picture
    142 on at

    I found the solution. If I change the code to the following. It works I am able to delete the event.

    Office365Outlook.CalendarDeleteItemV2("Calendar", ThisItem.EventID);

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @skong ,

    Glad that you have solved your issue and thanks for your sharing!
    Best regards,

    Allen

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,070

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 608

Last 30 days Overall leaderboard