Update I/O parameters of a custom assembly without unregistering it in Dynamics 365

By | July 13, 2018

Introduction:

As CRM developers we often come across some requirements to accomplish which, we need to write custom assemblies. The unique feature of a custom assembly is the Input and Output parameters saving some of the retrieves thus decreasing the processing time and complexity and eventually increasing the efficiency.

Recently we came across a scenario where changes made in the Input/output parameters won’t get reflected when we try to update the custom assembly.

So as can be seen from the screenshot below we have a custom assembly with only one input parameter of type string

Update IO parameters of a custom assembly without unregistering it

Now a few minutes later in the course of our development, we felt the need of another Input Parameter of type entity reference as below:

Update IO parameters of a custom assembly without unregistering it

And so, we did add the parameter then build and updated the assembly but still when we try to access the assembly in the workflow and access the new parameter we couldn’t see it.

Update IO parameters of a custom assembly without unregistering it

So, to reflect the changes in the I/O parameters of the custom assembly in the workflow kindly follow the below steps:

  1. Add or Remove the I/O parameters in your assembly as required.
  2. Then just before you build the assembly change the Major number of the version of your assembly. To do so follow the steps below.
  • In your visual studio from your project select the assembly, right click on it and select the Properties to navigate to the window as shown below.

Update IO parameters of a custom assembly without unregistering it

  • Then click on the “Assembly Information” button as highlighted in the above screenshot to access the assembly version.
  • Change the Major version of this assembly i.e. change the version from 1.0.0.0 to 2.0.0.0.

Update IO parameters of a custom assembly without unregistering it

3. Now just re-build & register this in your CRM as a new assembly. The CRM will identify this as the newer version of the already existing assembly and in your workflow steps you just need to change the version of your assembly to see the new set of I/O parameters.

Even in the Plugin registration tool one can find the version difference of both the assemblies in the properties tab as below.

Update IO parameters of a custom assembly without unregistering it

4. And in the workflow, you will start to see a dropdown besides your assemblies from where you can change the version.

Update IO parameters of a custom assembly without unregistering it

5. And when you choose the version 2.0 you can see the newly added parameter as below.

Update IO parameters of a custom assembly without unregistering it

Please Note in case you have an action in which you are using a custom assembly then all the above scenarios and solutions are very much applicable in this scenario as well.

Conclusion:

Thus changing the version number saves a lot of work which one would have to rather go through if they try to un-register and then re-register the assembly leading them to recreate the entire workflows or actions with all the steps.

Generate Your Own New Leads Now Within Dynamics 365 CRM with Maplytics