I am using the message module, so I have an entity of type 'message', as for the children I can get the machine name or the Uuid.
The problem I have is that by means of a 'hook_update_n' I need to update a field. The code I am using is:
function hook_update_8001() {
//Change content in text field for 'caregiver_referral_incomplete'.
$field_value = array(array('value' => 'Hello My formatted text', 'format' => 'basic_html'));
entity_load('message', 2166)->getTemplate()->set('text', $field_value)->save();
}
With this structure, I need the Mid, but I only have the machine name or the Uuid, some way to find it with that data?