Xrm.Page.ui.controls.get("agl_osnovnoy_dogovorid").getValue()[0].id
Xrm.Page.getAttribute("agl_osnovnoy_dogovorid").getValue()[0].id