Datetime field did not update using v10 API Sugar7.6.2.1?

I have to update custom field with custom module type="datetime" and argument with data is date('Y-m-d H:i:s')

I need to update using v10 REST API. but not working.

Please suggest.

Parents
  • Your question isn't clear enough for suggestions, can you show us the code that isn't working?  That should give us enough information you know exactly what it is you're trying to do.

    Kenneth Brill

    Developer Support Engineer

  • If you have custom field for date i.e 'note_time_c' for custom module 'Sugar7'. I would suggest you to try this one.

    $name = "Example";

    $datetime = "2016-04-15T18:47:00+05:30"; // Please use this format to update datetime

    $record_id = "(your record id which you need to update)"

    $url = $base_url . "/Sugar7/$record_id";

    $arguments = array('name' => $name, 'note_time_c' => $datetime);

    $response = call($url,$oauth2_token_response->access_token,'PUT',$arguments);

    Thanks & Regards

    Mohammed

    Software Engineer, Bhea Technologies Pte Ltd

Reply
  • If you have custom field for date i.e 'note_time_c' for custom module 'Sugar7'. I would suggest you to try this one.

    $name = "Example";

    $datetime = "2016-04-15T18:47:00+05:30"; // Please use this format to update datetime

    $record_id = "(your record id which you need to update)"

    $url = $base_url . "/Sugar7/$record_id";

    $arguments = array('name' => $name, 'note_time_c' => $datetime);

    $response = call($url,$oauth2_token_response->access_token,'PUT',$arguments);

    Thanks & Regards

    Mohammed

    Software Engineer, Bhea Technologies Pte Ltd

Children
  • Hi Mohammed,

    It's working fine.

    $datetime = "2016-04-15T18:47:00+05:30"; // Please use this format to update datetime

    Above format working for all timezone. or need to adjust (+5:30 GMT) add different time zone how it's work