So, I'm giving the Custom X++ script feature a go (https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/deployment/run-custom-scripts)
Long story short - the customer wants to rename a warehouse (InventLocation) but they are getting errors which are related to the fact that it is used in some InventDim records - which can't be simply renamed due to the SHA hash codes - so I need to fix them manually.
I create a deployable package for a new model with 1 runnable class as per the instructions, and uploaded it to the custom scripts screen.
I then realized that I wanted to do an additional change, so I did the change and tried to upload a second time. Now I get the following message when I try to upload:
A deployable package with the assembly signature 'Dynamics.AX.InventLocationTransferScript, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' already exists. The system will reuse the implementation from the existing package. Do you want to continue?
If I press cancel the process is abandoned, if I press Ok and continue, the process will keep on running my old script.
- My model version is 1.0.0.0 but even if I change it to up to 2.1.1.1 - so all versions, the assembly is still 0.0.0.0 and there is no way to specify it in the creation of the package or in the descriptor. The dll, if I unzip the deployable package is 2.1.1.1.
- I have checked the error and its label @AppTroubleshooting:CustomScriptDeployPackageAlreadyExists but it has no references - thus meaning its probably in a dll.
- I have also read at this link My take on the X++ custom scripts feature - ariste.info that the original assembly has been uploaded to "DIXF temp path set in the DMF parameters".
How can I get a new package in place other than creating a new model? Is it possible to somehow delete the file from the temporary folder or to update the assembly version?