How do I update a field value in hook_entity_insert()?
From this solution we can able to do like below to update an field on hook_entity_insert

$entity-&gt;field_range-&gt;value = 'test';
drupal_register_shutdown_function('_cc_custom_post_insert',$entity);

function _cc_custom_post_insert($entity) {
    if($entity) {
        $entity-&gt;save();
    }
}