The tutorial by Microsoft is very useful, but I wanted to create one in my own words with a few more images to hopefully help newer members of the Dynamics community. I’ve not included the code in this blog in case Microsoft update the MSDN article with newer versions of the code.
In this example, I will be making a cascading drop down between the out of the box businesstypecode field and a new custom field called new_businessspecialisation.
|Adding the code as web resources|
Once the web resources have been created you will need to define the Form On Load functionality, to this simply add the library, enter the function name and pass in the name of your JSON file into the parameters. The script provided by Microsoft this will then concatenate this into a URL to load the source from.
|Setting the Form On Load event|
|Setting the field On Change event|
Once this has been done, everything should be good to go. The next couple of images show the functionality in action.
|Field locked because no parent Business Type has been chosen|
|Metal & Plastics showing for Manufacturing|
|Dynamics & SharePoint showing for Application Development|