95
If a new field is created, having a table relation, the field datatype/length is set. If the related table definition is changed, e.g. increase of related (key) field length from code 10 to code 20, the fields having a table relation should be increased as well.

Describe the solution you'd like:
Have a new CodeCop rule that checks any field having a TableRelation to match at least the MINIMUM length of the related field (cfr. test codeunit 134926 Table Relation Test)

Also see Github
https://github.com/Microsoft/AL/issues/4493
Category: Development
STATUS DETAILS
Under Review
Ideas Administrator

Thank you for your feedback. We are considering adding it to our longer term roadmap.

Your help is greatly appreciated,
Business Central Team

Comments

F

following this, that could make the life of everyone much more easier (ie: series has been extended from 10 to 20 characters since Dynamics NAV :) )


in my opinion, the codecop rule should be triggered anytime the field type and length does not fit exactly to the one its related to.


what are the case when they might differ ?

Category: Development