Alok
Alok

Reputation: 3

Quick View field should fetch through JavaScript

I have a QuickView form on Case form . I want to fetch a attribute value from Quckview form through Javascript . I want email value should popup . But It is not working Related entity name is : Acount QuickView form name is :customerpane_qfc attribute name is :emailaddress1 I'm using this code

alert(Xrm.Page.getControl("MyQuickView_MyQuickView_systemuser_mobilephone").getAttribute().getValue());

but this code is not working.

Upvotes: 0

Views: 487

Answers (1)

Henrik H
Henrik H

Reputation: 5787

For getting a control in a Quick View Form with JavaScript, you use a syntax of "quickViewFormName_quickViewFormName_relatedEntityName_fieldName".

  • quickViewFormName is the name of the Quick View Control on your form (and yes, it should be repeated twice).
  • relatedEntityName is the name of the related entity.
  • fieldName is the name of the field in the related entity.

In your case you would thus do as follows (assuming the naming of your quick view form is as you write):

Xrm.Page.getControl("customerpane_qfc_customerpane_qfc_account_emailaddress1")
.getAttribute()
.getValue();

Upvotes: 1

Related Questions