Symptom
You observed that the patch doesn't provide a locked error.
Environment
SAP Cloud for Customer
Reproducing the Issue
- Go to Sales work center
- Click on Leads view
- Search for the relevant lead
- Open it
- Click on Edit
- Open Postman
- Fetch csrf token
- Enter token
- Change to Patch
- Enter payload
- Click on Send
- 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