Dynamics CRM 2011/2013 通过Javascript给lookup字段赋值

仅仅做下记录,因为老是用到但老是忘记

<span style="font-size:18px;">var value = new Array();
value[0] = new Object();
value[0].id = idValue;
value[0].name = textValue;
value[0].entityType = typeValue;

Xrm.Page.getAttribute(“fieldName”).setValue(value);</span>

或者

<span style="font-size:18px;">Xrm.Page.getAttribute(“fieldName”).setValue( [{id: idValue, name: textValue, entityType: typeValue}]);</span>


转载于:https://www.cnblogs.com/VicTang/p/3808991.html

猜你喜欢

转载自blog.csdn.net/weixin_33720452/article/details/93416741