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 / How do I get a calenda...
Power Apps
Answered

How do I get a calendar's event ID?

(0) ShareShare
ReportReport
Posted on by 802

Hi, 

 

I have a deskbooking app whereby, when booking, the below adds a calendar event based on some variables.

 

Office365Outlook.V4CalendarPostItem("Calendar", If(!IsBlank(LondonDelPerson), LondonDelPerson.DisplayName, User().FullName)&", Desk "& Buttontext &", London"& ", "&LDN_Date_Picker.SelectedDate, Text(DateAdd(DateTimeValue(LDN_Date_Picker.SelectedDate & " 08:00:00"), TimeZoneOffset(), Minutes),"mm/dd/yyyy hh:mm"), Text(DateAdd( DateTimeValue(LDN_Date_Picker.SelectedDate & " 18:00:00"), TimeZoneOffset(), Minutes),"mm/dd/yyyy hh:mm"), "(UTC) Coordinated Universal Time", {body: "Thank you for booking your desk",isAllDay:true, requiredAttendees:If(!IsBlank(LondonDelPerson), LondonDelPerson.Mail, User().Email)});

 

I want to use Office365Outlook.CalendarDeleteItem_V2 to remove this event from the reservee's calendar when they cancel the booking in the app (this is done on a Remove command from the Dataverse table). I have started using the CalendarDeleteItem_V2 command but it is asking for the event ID... a) how do I find this and b) how can I have it as a variable so that only the event they are cancelling gets removed from their Outlook calendar?

 

Any ideas how I can achieve this?

 

Thanks

K

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

    Hi @Kosenurm :

    Please try to user this formula to create a event:

     

    Set(Thevar,
    Office365Outlook.V4CalendarPostItem("Calendar", If(!IsBlank(LondonDelPerson), LondonDelPerson.DisplayName, User().FullName)&", Desk "& Buttontext &", London"& ", "&LDN_Date_Picker.SelectedDate, Text(DateAdd(DateTimeValue(LDN_Date_Picker.SelectedDate & " 08:00:00"), TimeZoneOffset(), Minutes),"mm/dd/yyyy hh:mm"), Text(DateAdd( DateTimeValue(LDN_Date_Picker.SelectedDate & " 18:00:00"), TimeZoneOffset(), Minutes),"mm/dd/yyyy hh:mm"), "(UTC) Coordinated Universal Time", {body: "Thank you for booking your desk",isAllDay:true, requiredAttendees:If(!IsBlank(LondonDelPerson), LondonDelPerson.Mail, User().Email)})
    )

     

    Then you could use this formula to get the event id:

     

    Thevar.id

    If you want to remove the event you just created just use this formula:

    Office365Outlook.CalendarDeleteItemV2("Calendar",Thevar.id)

     

    Best Regards,

    Bof

  • MtryDoc Profile Picture
    55 on at

    Thank You....  I have spent so many hours on this.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard