Skip to main content

Hi,

I have a Custom Logical Unit created and a projection of type Integration created for it. I am able to retrieve the data from Postman without issues.

When I try to update using PATCH, I keep getting the following error. If I pass a non-existing objkey, then it creates a new record in the CLU.

Do I need to do anything differently to be able to modify records in the CLU?

{

    "error": {

        "code": "DB_OBJECT_MODIFIED",

        "message": "Resource already modified.",

        "details": /

            {

                "code": 20114,

                "message": "ORA-20114: TestOrderDetails.MODIFIED2: The Test Order Details for Demo object has been modified by another user. Please refresh the object and reenter your changes."

            }

        ]

    }

}

Thank You.

Hi @khtdinesha , All, 

 

I got the same error for PATCH call for a Custom Entity. Did you manage to resolve this? If so could you please share how did you manage to resolve?

 

Thank you and Best regards,

Ravi


Hi,

I am not sure whether this will be a solution but before sending the patch request did you trying adding ‘If-Match’ property to the request header?

Usually if the record is already created from the GET request you can receive the ‘@odata.etag’ like below →
 

 

Get the value for @odata.etag and Make sure to remove the red highlighted backslashes from the content as they are used to handle double quotes in JSON - W/\"Vy8iQUFBdkJNQUFHQUFCYXRHQUFDOjIwMjIwMTIyMDkxNTIzIg==\"

Then add this value to request header and send the request

 

Note that as mentioned the red-highlighted backslashes need to be removed before adding it to the header

/Dananjaya Misso.


Thank you @Dananjaya M. . It works like a charm..!!!

 


@Ravi De Silva  Great to hear 😀
@khtdinesha if the provided solution works for you as well maybe you can tag my answer as the solution 😉


Hi @Dananjaya M. 

Yes, it worked for me too. Thank you!