仅仅做下记录,因为老是用到但老是忘记
<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>