Tags

, , , ,

Reproduce the error

  1. Create a content type called “Training” or choose different name if you want, which inherits from “Event” content type.
  2. From new content type remove the column called “Start Time”. Internal name of the field is “StartDate”.
  3. Create a list called “Trainings”, attach “Training” content type on it and remove the default one (“Event” content type).
  4. Try to add a new record

You will discover you won’t be able to add a new record. The error will contain this message: “The data source control failed to execute the insert command.” or/and “Invalid data has been used to update the list item. The field you are trying to update may be read only.”

Solution

Go to site content type, locate “Training” content type and add to it site column “Start Date”. It is the same column as the one you just removed (note: the internal field the same).

Cause

This is cause by the fact you are trying to set an end date (“End Time” column was not removed from the content type or the list) without having a start date. If you need an end date for an event, please keep both columns.

Event columns

Advertisements