Closed ChrisBlankDe closed 2 years ago
We will align the validation done by AppSourceCop with what is mentioned in the docs for the property: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-sqldatatype-property
It will then be allowed to convert from Varchar and Integer to Variant, any other changes will result in a diagnostic AS0036.
Note that in order to have this validation enabled, you need to setup the AppSourceCop for breaking change validation, see https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop#configuration
The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 33075 and VS Code Extension Version
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/
Title Changing SqlDataType does not result in an CodeCop Warning
Description Changing or setting the SqlDataType Property on an table field does not result in an warning or error from the code cops. since the AppSourceCodeCop check such szenarios (datatype change, field deletion, key modification,..) it should also check if the SqlDataType has changed in an way where a sync would break.
Reason for the rule Its important to get the info about an breaking change at compile time.