SAP Knowledge Base Article - Public

2994775 - PATCH Does Not Provide Object Locked Error

Symptom

You observed that the patch doesn't provide a locked error.

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to Sales work center
  2. Click on Leads view
  3. Search for the relevant lead
  4. Open it
  5. Click on Edit
  6. Open Postman
  7. Fetch csrf token
  8. Enter token
  9. Change to Patch
  10. Enter payload
  11. Click on Send
  12. Note: Status is 204 No Content.

Cause

A possible cause is that no attribute from the headers is being passed in the payload.

Resolution

With PATCH operation, OData framework calculates the delta changes. The solution is that you need to add at least one attribute from the lead header. If at least one attribute from the lead header is being passed, then you will receive object locked error. However, if the new value of the header object is equal to the old one, then update of such properties is skipped. Error message occurs only when the BO modify is called with changes. If no changes found, BO modification table is empty, and no error message is shown.

Keywords

object locked, lead doesn't throw error, patch, , KBA , LOD-LE-MKT-LEA , Lead , AP-RC-ODF , OData framework (C4C Only) , Problem

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions