function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Praneetha MurakondaPraneetha Murakonda 

how to pass UID while sending email as calendar invite using apex?

Hi,

I have a requirement like sending email as calendar invite when trigger gets fired. I'm using approach as below. But not able to view Yes, Maybe, No options if i give global UID. Please let me know if there is any approach to achieve this.

                               vCal = 'BEGIN:VCALENDAR' + '\n' 
                                + 'PRODID:-//Google Inc//Google Calendar 70.9054//EN' + '\n' 
                                + 'VERSION:2.0' + '\n' 
                                + 'CALSCALE:GREGORIAN' + '\n'
                                + 'METHOD:REQUEST'+ '\n'
                                + 'BEGIN:VEVENT'+ '\n' 
                                + 'DTSTART:'+strStartDate+ '\n' 
                                + 'DTEND:'+strEndDate+ '\n' 
                                + 'DTSTAMP:'+ strCreatedDate+ '\n' 
                                + 'ORGANIZER;CN=XYZ:MAILTO:'+'Test@gmail.com' + '\n' 
                                + 'ATTENDEE:MAILTO:'+strEmailsList+ '\n' //strEmailsList
                                + 'UID:'+objRP.Id+strCreatedDate+'@gmail.com'+'\n' 
                                + 'CREATED:'+strCreatedDate+'\n' 
                                + 'DESCRIPTION:Research Activtity is scheduled.' + '\n' 
                                + 'LAST-MODIFIED:'+strCreatedDate+ '\n' 
                                + 'SEQUENCE:0' + '\n' 
                                + 'STATUS:CONFIRMED' + '\n'
                                + 'RSVP=TRUE' + '\n'
                                + 'SUMMARY:Research Activity'+activityName+'Schedule'+'\n' 
                                + 'LOCATION:'+meetingurl+'\n'
                                + 'TRANSP:OPAQUE' + '\n' 
                                + 'END:VEVENT'+ '\n'
                                + 'END:VCALENDAR';
                        
                        system.debug('::::vcal::'+vCal);

NagendraNagendra (Salesforce Developers) 
Hi Praneetha,

May I suggest you please check with below blogs which might help you to accelerate with above requirement. Please let us know if this helps.

Regards,
Nagendra.