• mcherry
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I've noted that you can't directly create and EventAttendee object through using the API from the API documentation and a few different posts on the forums.  What I'm wonder is if it's possible to indirectly add an attendee to an event using the API by automatically sending and invitation for an event?

We want to create a registration form that will allow people to fill out a form online to sign up for an event.
I have an s-control which invokes the API using Javascript and the AJAX Toolkit v11. My code is able to create Events, and I'm stuck now trying to create such Events to include multiple attendees.
 
The following code snippet does NOT work:
 
var TestAttendee = new sforce.SObject("EventAttendee")
TestAttendee.AttendeeId = "00570000000mZcp" //this is a valid User ID
TestAttendee.EventId = "00U70000006J7oq" //this is a valid existing Event ID
var result = sforce.connection.create([TestAttendee])
This returns the error "CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY". What am I missing?
 
Is EventAttendee createable? The API documentation does not list "create" as one of the available methods for this object type, however some of the EventAttendee fields say that they do support "create".
 
What about the Event.IsGroupEvent field? Do I need to set that to TRUE first, or does that happen automatically when attendees are added to that event? It doesn't seem like that field is updateable anyway, so I couldn't set it to TRUE if I wanted to.
 
Do the attendees need to be added during the initial creation of the event? How is that accomplished? I would assume you need the event first, in order to pass the EventID to the EventAttendee object, but perhaps I'm wrong?
 
Please help.
 
P.S. Salesforce Premier Support says that it IS possible to add EventAttendees via the API, but they won't tell me how and instead told me to buy Professional Services...