You need to sign in to do that
Don't have an account?
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);
May I suggest you please check with below blogs which might help you to accelerate with above requirement.
- https://douglascayers.com/2015/01/09/salesforce-send-calendar-invites-in-visualforce-email-templates/
- http://eltoro.force.com/SendingOutlookCalendarInvitesFromApex
Please let us know if this helps.Regards,
Nagendra.