Access the fields on Quick View Form – Dynamics CRM 2015


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:
  Here is the Following steps to get the value from the QuickView form
    Sample Quick Form
    Eg: We need to get the attribute value called AccountNumber from QuickForm


Step 1:

Open the Customization->Entity->Form

   
Step 2:
 Double click the customer pane window to see the properties and note the quickformname,and related entity name.Click Edit.
     

Step 3:
  Our goal is to get the attribute name of AccountNumber.
  After Click Edit the following dialog box with Field Properties and note down the attribute name



Code:


below is the format
//QuickFormname_QuickFormname_EntityName_AttributeName
if(Xrm.Page.getControl('customerpane_qfc_customerpane_qfc_account_accountnumber') != null) {
            var caseCustomerPanectrl = Xrm.Page.getControl('customerpane_qfc_customerpane_qfc_account_accountnumber');
            strAccountNo = caseCustomerPanectrl.getAttribute('accountnumber').getValue();
        }


Well its is easily done without any stuff!!!!

   
  





Comments

Popular posts from this blog

Asp.net- Encrypt and Decrypt connection strings in web.config file

CRM Automate build Solution using Powershell commands