You have a form in Dynamics 365 in which you need to show field values from related entity. It is naturally possible to do this by making a request to the Dynamics server side API’s from client side code. There are a few possibilities to that but I will not focus on those in this blog post.
Below are steps how to do this:
- Create one quickview form to the Customer Asset entity. Add two Customer Asset entity fields into this quickview form:
- Account (lookup)
- Product (lookup)
- Insert that quickview form to the Case entity form and set the quickview form properties so that the name of the form is “CustomerAssetProductCustomer” and then set the data source properties of that quickview form according to your field names in the CRM form. You can set the quickview form not be visible by default.
var quickViewControl = Xrm.Page.ui.quickForms.get(“CustomerAssetProductCustomer”);
var product = quickViewControl.getControl(“msdyn_product”).getAttribute().getValue();
var account = quickViewControl.getControl(“msdyn_account”).getAttribute().getValue();
At Cloudriven, we help organizations in every step of the Dynamics 365 projects. If you require any help just contact us. We are here for you !