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
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:
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.
So, to reflect the changes in the I/O parameters of the custom assembly in the workflow kindly follow the below steps:
- Add or Remove the I/O parameters in your assembly as required.
- 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.
- 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 184.108.40.206 to 220.127.116.11.
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.
4. And in the workflow, you will start to see a dropdown besides your assemblies from where you can change the version.
5. And when you choose the version 2.0 you can see the newly added parameter as below.
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.
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.