Access the fields on Quick View Form – Dynamics CRM 2013

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:

Access fields on Quick View Form

Access fields on Quick View Form

 

 

 

 

 

 

 

 

 

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

Advertisements

2 thoughts on “Access the fields on Quick View Form – Dynamics CRM 2013

  1. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s