Posts

How to use JQuery customizations in Dynamics 365 portal forms?

This screen cast video is about JQuery customizations in Dynamics 365 portal forms. I demonstrate here using rather simple scenario that what are the possibilities and how to develop the code. Furthermore, I show you how to use browser developer tools to debug the JQuery code to verify and troubleshoot your JQuery.

This is the third part of my Dynamics 365 portal video series. In the first part, I showed you how to install the Dynamics 365 portal instance and how to make basic configurations into it. In the second part, I showed you how to do the portal UI customizations. There will be more coming up so thank you for watching and stay tuned for more.

Dynamics365

How to make UI changes to the Dynamics 365 portals?

In this screen cast video, I show you how to make changes to the look and feel of the Dynamics 365 portal UI. I picked three different scenarios by which I demonstrate the possibilities to modify the UI elements. These three include familiarizing to the Dynamics 365 portal UI concepts, making changes to the css-files and utilizing custom Bootstrap template.

This is the second part of my Dynamics 365 portal video series. In the first part, I showed you how to install the Dynamics 365 portal instance and how to make basic configurations into it. There will be more coming up so thank you for watching and stay tuned for more.

Dynamics 365 portals

How to setup Dynamics 365 Portals?

In this screen cast video, I show you how to do Dynamics 365 Portals setup. I will cover the installation steps that are needed to take in the Dynamics 365 admin center to have portal up and running against Dynamics 365 online instance. 

This is the first part of the series of Dynamics 365 Portal videos that I’m going to do. In the future parts, I will be covering other aspects of the Dynamics 365 Portals for example the authentication and authorization, configuring the CRM data to be shown in the Portal, Portal development using Jscript and Portal UI tuning. So stay tuned for more.

Dynamics 365 unified service desk

How to setup Dynamics 365 Unified Service Desk and how it is used in Call Center scenarios?

In this screen cast video, I show you how to install a basic Dynamics 365 Unified Service Desk (USD) setup. Furthermore, I share a few nice-to-know things that I learned while I installed my own demo environment. Finally, a few words about setting up a Live Assist chat service and how that is integrated to D365 USD.

Check it out!

How to set Dynamics 365 related entity fields using quickview forms

Challenge

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.

Instead of server side API requests, there is a simpler way to utilize Dynamics quickview forms and JavaScript. This way you don’t need to do any API requests in code.

The scenario could be such where you have for example a Dynamics 365 Case entity form, and you’d need to show the related Product and Account entity values in lookup fields. These Product and Account lookup fields would get loaded when a Customer Asset entity lookup field value gets changed. This would mean that when user selects a customer asset for a case, then product and customer information would get loaded automatically to the form without user’s having to select them manually from individual lookup fields. By just using quickview form, the fields in it are read-only. So that’s why you’d need to have separate Account and Product lookup fields in Case entity form into which you set the values through JavaScript from the quickview form.

Solution

Below are steps how to do this:

  1. Create one quickview form to the Customer Asset entity. Add two Customer Asset entity fields into this quickview form:
    1. Account (lookup)
    2. Product (lookup)
  2. 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.
  3. Add a small piece of JavaScript code to the OnChange event of the Customer Asset lookup field on the Case entity form. This JavaScript will fetch the Account and Product values from quickview form and set those values to the corresponding lookup fields on the Case form. While I was testing this scenario, I noticed that without adding a small delay to the JavaScript function processing, the quickview form was not loaded yet when the JavaScript got processed and that’s why it always set incorrect Account and Product values to the lookup fields. Those were the Account and Product lookup values from the previously selected Customer Asset. By adding a half a second delay, the solution started working properly.

function populateFieldsFromCustomerAssetRecord()

{

if(Xrm.Page.getAttribute(“yourcustomerassetlookupfield”).getValue())

{

setTimeout(populateFields, 500);

}

}

 

function populateFields()

{

var quickViewControl = Xrm.Page.ui.quickForms.get(“CustomerAssetProductCustomer”);

if (quickViewControl)

{

if(quickViewControl.isLoaded())

{

var product = quickViewControl.getControl(“msdyn_product”).getAttribute().getValue();

var account = quickViewControl.getControl(“msdyn_account”).getAttribute().getValue();

Xrm.Page.getAttribute(“productid”).setValue(product);

Xrm.Page.getAttribute(“customerid”).setValue(account);

}

}

}


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 !

Contact Form

Want to know more about our products or services? Fill out the form and we'll be in touch as soon as possible.