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 / V4CalendarPostItem Issue
Power Apps
Unanswered

V4CalendarPostItem Issue

(0) ShareShare
ReportReport
Posted on by 4

Hi - hoping someone can help. I followed an excellent YouTube tutorial on creating a simple calendar application. Most of it is working perfectly, but I want the user to be able to add an item from the SharePoint calendar into their personal calendar. The tutorial used an old version of PostItem, so I'm not sure sure what else I might need to change. The code below is a slightly tweaked version of what was in the tutorial.

 

dropdowncal is a dropdown box that allows the user to select which calendar to add an item to. This is working, so I think the data connection to Outlook is OK. The rest is throwing up a bunch of "invalid argument" errors. 

 

Office365Outlook.V4CalendarPostItem(dropdowncal.Selected.Value, BrowseGallery1.Selected.Title, Text(BrowseGallery1.Selected.EventDate,DateTimeFormat.UTC), Text(BrowseGallery1.Selected.EndDate,DateTimeFormat.UTC), {Body: BrowseGallery1.Selected.Description, IsHtml: true, Location:BrowseGallery1.Selected.Location} );

UpdateContext({CalButton:false});UpdateContext({CalButtonDone:true})

 

Categories:
I have the same question (0)
  • yuxi666 Profile Picture
    Microsoft Employee on at

    Hi @stevie_b 

     

    Could you please share the Link you have followed?

     

    Best Regards.

    yuxi

  • Community Power Platform Member Profile Picture
    on at

    @stevie_b 

    I had a similar issue the other when trying to do something like this. I went back to V2 and some parts worked but some didn't. I gave up trying after that and deleted my code attempts ...

  • stevie_b Profile Picture
    4 on at

    Hi @yuxi666  - this is the video. https://www.youtube.com/watch?v=1rsyyYiI4sU

     

    I'm pleased to say that following some trial and error with a colleague I was able to get it working.  I've added the updated OnSelect code below. It seems that V4CalendarPostItem had some different requirements to V2. I still need to add back in the ability to grab event location and description, but the events themselves are now correctly being entered into my calendar. The last part, Select(Icon4) is just the instruction to close the dialog box after the action is completed.   

     

    Office365Outlook.V4CalendarPostItem(dropdowncal.Selected.Name, BrowseGallery1.Selected.Title, Text(BrowseGallery1.Selected.EventDate,DateTimeFormat.UTC), Text(BrowseGallery1.Selected.EndDate,DateTimeFormat.UTC), "UTC"); Select(Icon4)

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard