+ Start a Discussion
sparkysparky 

add event invitation without sending email?

I'm creating events in an apex routine, and also need to create some "group events" (with multiple users invited.)

So my code creates an event, gets the id, then adds child EventAttendee records.  It works- so far so good. 
The problem is that it seems to always cause emails to get sent to the users invited.  When adding invitees via the UI, there's two options - SAVE, and SAVE AND SEND UPDATE.  The latter seems to send an email while the former doesn't.

With Apex/API I don't see how to make the same thing happen.  Is there a field in either object I can set to avoid sending the email?

Thanks much!


Susana NTSSusana NTS

Hi Sparky,

 

Unfortunately I don't have the answer to your question.

Maybe you found it but you haven't update this post :)

 

Anyway, maybe you could help me here... I was wondering if it would be possible to create in apex code a new event on a public calendar with invitees. 

 

Thanks in advance.

Regards,

 

Susana

 

sean*harrisonsean*harrison

Hi Susana,


From everything I can find (and I tried it myself) there's no way add invitees to Events programmatically. I want to do exactly what you describe but this seems like a show-stopper.


I say this because the Idea below is still outstanding...

 

"Unlock EventAttendee in the SalesForce API"
A standard Contact (or Account, Lead, etc) is joined with an Event using the EventAttendee object. Using this relationship you can associate a contact with an event in the Salesforce interface standard application interface. However, if you try to associate a contact with an event using the API, you will find that the EventAttendee object is read-only. Please fix this! With this capability an entire new class of applications could be written using the Salesforce API!! Without this ability developers have to "recreate the wheel" for time/event based apps by creating our own contact and event objects. Also, if you create a custom object, for some reason you cannot join that custom object to the event side of your relationship - only to the contact side. So, the only option is to roll all your own objects. I would much rather use the standard objects in Salesforce. I have even studied the Event Management Custom App written by Salesforce.com and they also have to create custom objects that basically duplicate the functionality already found in the Contact and Event object. Why make us do this? Why do this yourselves :-)
http://success.salesforce.com/ideaView?c=09a30000000D9xt&id=08730000000BrDkAAK

no indication that it is in progress or released. Latest post on Aug. 2010

 

And this issue is discussed numerous times here in the developer board at:
http://boards.developerforce.com/t5/Apex-Code-Development/Trigger-on-Event-to-update-Custom-feild-on-all-Events-Attendee/td-p/144385
http://boards.developerforce.com/t5/AJAX-Toolkit-S-Controls/Unable-to-add-event-attendees-via-the-API-I-m-using-AJAX-Toolkit/td-p/60733/highlight/true
http://boards.developerforce.com/t5/NET-Development/Event-Attendee/m-p/104193/highlight/true
http://boards.developerforce.com/t5/Apex-Code-Development/Event-Attendee-trigger/m-p/107892
http://boards.developerforce.com/t5/Apex-Code-Development/Can-we-use-API-call-on-Event-Invitees/m-p/155892#M22548
http://boards.developerforce.com/t5/Apex-Code-Development/Create-Group-Event-with-invitees-in-APEX/m-p/210506

 

I'd love to know how Sparky did "So my code creates an event, gets the id, then adds child EventAttendee records.  It works- so far so good."

sparkysparky

Sorry, this was so long ago that I really don't remember the context or the result.

 

I do know that for a long time I was doing some work with public calendars, so it may have been in that context.