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
NikkiNikki 

Adding event data through the api

I am trying to add some very simple event data through the api.  I have whoID set to a valid contact id as a Java String object, due date time as a Java Date object, and a subject set to "Webcast" as a Java String object.  The insert call throws no exceptions but the elements of the return vector all say something about field integrity for an integer.  Any ideas?
DevAngelDevAngel

Hi Nikki,

The field integrity violation is a generic fault that can occur if 2 fields are in conflict.  Where this can jump up and bite you is in the events.  If you are creating an event like a meeting or a webcast, you will need to set the allDay field to false and the duration to some number of minutes.  The problem you are seeing is probably related to the duration.  Set a duration for the event and let me know if that solves the problem.

FYI In the next version of the API (~November) we will be providing more information on the field integrity violation.  Namely, which fields are in conflict.

NikkiNikki
Adding the allDay flag and a duration worked.  More information on which fields are in conflict would be great, that exception is pretty nebulous right now.  Thanks again!