Quick view forms in Dynamics CRM 2013 allow you to display all the related entity information.
Is there a way to retrieve the field value on Quick View Form using JavaScript without additional OData call to the associated entity?
The answer is Yes and here is the sample of the form and JavaScript:
Sample Code
<copy and paste the code>
//==============================================================
function OnLoad()
{
// pattern seems to be ControlName_ControlName_entityname_fieldname
var quickViewTelephone1Control = Xrm.Page.getControl(“AccountQuickView_AccountQuickView_account_telephone1”);
if(quickViewTelephone1Control != null) {
var telephone1 = quickViewTelephone1Control.getAttribute().getValue();
}
if (telephone1 == null) {
quickViewMobilePhoneControl.setVisible(false);
} else {
alert(“Telephone1 from Quick View is ” + telephone1);
}
}
//==============================================================
Author: Zhe Chen
Title: Lead Dynamics CRM Consultant @ Adisys
Email: zhechen@adisys.co
its not working
I’ve read some just right stuff here. Definitely price bookmarking for revisiting.
I wonder how so much attempt you put to create one of these fantastic informative site.