I just noticed recently that a text field in CRM form will not have its value updated until I clicked away from the field.
This is an issue simply because if the next step is a ribbon click which validates that field, the crm attribute simply returns null or the previous value.
A workaround for this is to call
blur on the html element. I doubt this is supported but this method is supported on all the major browser.
var element = document.getElementById("new_textfield"); element.blur();
Cheers – Sy