javascriptoutlookicalendar

Ics file is "sending update" instead of creating a "send"


I have this meeting appointment i'm trying to send from an .ics file. This is the data

"BEGIN:VCALENDAR\n" +
"CALSCALE:GREGORIAN\n" +
"METHOD:PUBLISH\n" +
"PRODID:-//Send project Invite//EN\n" +
"VERSION:2.0\n" +
"BEGIN:VEVENT\n" +
"UID:gestionprojetsCalendarInvite\n" +
"DTSTART;VALUE=DATE-TIME:" +
convertDate(startDate) +
"\n" +
"DTEND;VALUE=DATE-TIME:" +
convertDate(endDate) +
"\n" +
"SUMMARY:" +
subject +
"\n" +
"DESCRIPTION:" +
description +
"\n" +
"LOCATION:" +
location +
"\n" +
to.filter(o => o != '').map(o => "ATTENDEE;MAILTO:" + o.email).join("\n") +
"\n" +
"BEGIN:VALARM" +
"\n" +
"TRIGGER:-PT15M" +
"\n" +
"ACTION:DISPLAY" +
"\n" +
"DESCRIPTION:Reminder" +
"\n" +
"END:VALARM\n" +
"END:VEVENT\n" +
"END:VCALENDAR";

I want to know why, when I open the .ics file, it's saying "send update" instead of "send".

What I get :

what i get

What I want :

What I want


Solution

  • I believe it’s because you have static UID for all .ics you generated. "UID:gestionprojetsCalendarInvite\n"

    UID aka unique ID, is supposed to uniquely represent a calendar event. When you open an ics file containing duplicated UID, your app (Outlook I guess?) thinks you want to update an existing event, not creating a new one.

    Try give it a different UID to see if that solves your problem.

    Ref: https://icalendar.org/New-Properties-for-iCalendar-RFC-7986/5-3-uid-property.html