Skip to content

Some Technical Details

Pavel Khorozhansky edited this page Jan 16, 2018 · 3 revisions

Couple of technical notes regarding additional extending possibilities have been already mentioned on the Configuration Settings page.

Here you can find some further technical details.

Dynamically registered Plugin Steps

When you save a form containing multi-select controls, and you changes selected options in the controls, the system receives information about the options you selected inside the controls via Plugins and performs appropriate actions to associate/disassociate records. When you create "Item Set Configuration" records, the system creates required Plugin Steps automatically as necessary. For each of the entity mentioned in the "Item Set Configuration" records, the system creates a set of 4 plugin steps. Two of them, Pre-Validation and Post-Operation steps for Update message fire only when special attributes ("Dummy Saving Attributes") have some value specified (in order to minimize impact on performance):

image

Control's Web Resources

When Configuration Wizard embed a control into a form, it actually create a dedicated section and place there a configured web resource along with hidden "Dummy Saving Attribute". Web resource refers to a template you selected in wizard, and its additional parameter refers to "Item Set Configuration" record:

image

PowerShell scripts

You may be interested in this topic in case you want to change something inside the project. In the source code, you can find a project called "Solutions" which contains some useful PowerShell scripts. The first purposes of it is to build the Base Managed Solution containing a SiteMap modification Taking into account the way how Unmanaged solutions work in Dynamics, we should not include SiteMap modification into them as it would cause unexpected SiteMap change when you install such a solution (it would actually remove all your custom SiteMap modifications in the target instance). At the same time, it's fine to include SiteMap modification into Managed solutions as in this case existing SiteMap customization will remain in the target instance. Thus, here, our base Unmanaged Solution (AdvancedMultiSelectForDynamics_unmanaged_2_2_x_x) does not contain SiteMap changes inside in order to avoid the potential issue mentioned above. Instead, you can make use "ExportAndPrepareAllSolutions.ps1" PowerShell script which connects to a Dynamics CRM/365 instance/organization where both 'AdvancedMultiSelectForDynamics' and 'DemoForAdvancedMultiSelect' UNMANAGED solutions are placed and exports each of them as both Managed and Unmanaged solutions into AdvancedMultiSelect\Solutions\Solutions\ folder. This script also adjusts 'AdvancedMultiSelectForDynamics' MANAGED solution FILE adding Site Map customization to it directly. So, eventually, you get base Managed Solution with required SiteMap customization. The PowerShell project also contains couple other scripts which could assist you with automatic solutions imports (as needed, Managed or Unmanaged ones).

image

Note: you must install Microsoft.Xrm.Data.PowerShell module before running scripts in this project.