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
Pranav NairPranav Nair 

Creating eventRelation objects returns error.

Hello,
I am using eventRelation objects to link contacts to an event, and the following is the code i've implemented.
eventRelation = h.generateObject('EventRelation')
eventRelation.EventId = result.id
eventRelation.RelationId = id
eventRelation.isInvitee = True
eventRelation.isParent = False
result = h.create(eventRelation)

(I'm using salesforce-python-toolkit here) But this gives me the following result.
(SaveResult){
   errors[] = 
      (Error){
         message = "duplicate value found: <unknown> duplicates value on record with id: <unknown>"
         statusCode = "DUPLICATE_VALUE"
      },
   id = None
   success = False
 }

Please suggest. Thanks!!