Access the fields on Quick View Form – Dynamics CRM 2015
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
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
Post a Comment