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

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

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard