Thursday 29 May 2014

how to access crm record attributes from an opened window

For modeled window

window.showModalDialog(strSourceURL,window,"dialogHeight:600px;dialogWidth:450px;center:yes; resizable:0;maximize:0;minimize:0;status:no;scroll:no");

window.dialogArguments.Xrm.Page.data.entity.attributes.get('crm attribute name').setValue('some value');

---
For non modeled window

window.open(strSourceURL,"customsearchwindow","dialogHeight:600px;dialogWidth:450px;center:yes; resizable:0;maximize:0;minimize:0;status:no;scroll:no");

window.top.opener.Xrm.Page.data.entity.attributes.get('crm attribute name').setValue('some value');

--


No comments:

Post a Comment