AnsweredAssumed Answered

Contact record not getting updated

Question asked by Sagar Patil on Feb 11, 2018
Latest reply on Feb 13, 2018 by ted moriello

Hi All,

 

We are frequently calling Contact module update API from another application. Lets see below example.

 

We are using PUT method to update record. Actually, Other system users changing fields so whatever field changed there they will send using below API.

1) http://localhost:8080/sugar/rest/v10/Contacts/d906fc46-a2db-8837-f886-58381312d5b2 

{
"id": "d906fc46-a2db-8837-f886-58381312d5b2",
"first_name": "Sagar",
"last_name": "Patil",
}

2) http://localhost:8080/sugar/rest/v10/Contacts/d906fc46-a2db-8837-f886-58381312d5b2 

{
"id": "d906fc46-a2db-8837-f886-58381312d5b2",
"comment": "This is for testing",
}

 

 

Maybe both request raised parallel or fractions of second difference  by other system. We checked in database and we found data not saving properly and we tested 2-3 times and results are below.

Results:

Id

first_name

last_name

comment

d906fc46-a2db-8837-f886-58381312d5b2

Sagar

Patil

 

d906fc46-a2db-8837-f886-58381312d5b2

 

 

This is for testing

d906fc46-a2db-8837-f886-58381312d5b2

 

 

 

 

Expected result: 

Id

first_name

last_name

comment

d906fc46-a2db-8837-f886-58381312d5b2

Sagar

Patil

This is for testing

 

Note: Below just 2 API calls but production environment it will go N number of API call for same record saving. 

 

Please anybody help on this?

 

Regards,

Sagar

Outcomes