Hi Experts,
I want to assign the value from a QuickViewForm to a field on the form using below code.
My custom field name: new_primary
QuickViewFormName: accountcard
function getAttributeValue() { var quickViewControl = Xrm.Page.ui.quickForms.get("accountcard"); if (quickViewControl != undefined) { if (quickViewControl.isLoaded()) { // Access the value of the attribute bound to the constituent control var myValue = quickViewControl.getControl(0).getAttribute().getValue(); Xrm.Page.getattribute("new_primary").setValue(myValue); return; } else { // Wait for some time and check again setTimeout(getAttributeValue, 10); } } else { Xrm.Page.getattribute("new_primary").setValue("No Value"); return; } }
This returns No Value to my custom field. What am I doing wrong? why is it not accessing the quick view form ?
*This post is locked for comments