Xrm.Page.getAttribute("").getValue() don't get actual value

Jorge picture Jorge · Jan 28, 2013 · Viewed 24.1k times · Source

I have a custom entity in CRM 2011 with a Closure Code(drop down list) and Solution(multiple lines text) fields.

Is weird what is happening, and this is that the next sentence, is not getting the actual field value:

var detailsSet = Xrm.Page.getAttribute("aux_solution").getValue();

Why this could happen?

Answer

Jorge picture Jorge · Jan 30, 2013

As explained in the comments, my problem was that the field wasn't taking the actual value because the focus was on it. Moving to another field before checking the values is how I solve this. I hope could help someone.