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

匆匆过客 提交于 2019-12-08 02:48:03

问题


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?


回答1:


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.




回答2:


That is because the object model does not get refreshed data while you have focus on the field. If you want to get the value without having to click outside you need to use the good old document.getElementById .




回答3:


If it is an option set, you should use eiter getSelectedOption() or getText()

so try

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

For more details refer this



来源:https://stackoverflow.com/questions/14561802/xrm-page-getattribute-getvalue-dont-get-actual-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!