How to set date_modified through REST API

I want to set the date_modified field of Notes that I am importing through the REST API. However, I can't see any way to turn off the automatic updating of date_modified in the REST API, if I try setting update_date_modified to false this has no effect.

An example of data I am sending via an HTTP PUT:

{
   "update_date_modified": false,
   "date_modified": "2016-02-09T10:12:52.0000000"
}

The request works but the date_modified is set to the date of the request, not the value I set

Parents Reply
  • Just out of curiosity, I went into the code and have a look at the SugarBean.php file. So you are right , the above-mentioned code will work and change the date_modified as on line 2101, it is setting the date_modified based on $prev_date_modified variable. As per line 2064, this variable will contain either the old date_modified or the one set by your code.

    Strange that it is not working via API as ultimately APIs are also calling SugarBean saveData function.

Children
No Data