SAP Knowledge Base Article - Public

3168746 - Start date set after due date when creating task via OData with error 'Please select end date and time that is later than start date and time.'

Symptom

 The Start date is set after due date when you create Tasks via OData. Error:  'Please select end date and time that is later than start date and time.'

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to the Administrator work centre -> OData service explorer
  2. Click on c4codataapi
  3. Click Test
  4. In the Entity sets column select TasksCollection
  5. Click Test
  6. Choose POST method and put this URL https://my123456.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/TasksCollection (/my123456 represents your system's url, please adapt to the relevant tenant)
  7. Select JSON and put the below code:

{
"Subject": "test",
"DueDateTime": "2022-02-06T00:00:00+00:00"
}

  1. Click execute and you will see the error message as follows: 'Please select end date and time that is later than start date and time.'

Cause

You need to maintain StartDateTime as it is mandatory in order to create a new task.

Resolution

We kindly request you to add StartDateTime in the payload and try executing the post call. 

Keywords

 'Please select end date and time that is later than start date and time.' , KBA , LOD-CRM-ACT , Activities , Problem

Product

SAP Cloud for Customer core applications 2111