12

Add a ValuesNotAllowed / ValuesDisallowed attribute to the field object on a page for enums and options. This would work alongside the ValueAllowed attribute and the ValueAllowed would take presidence for backwards compatibility.


There are two good reasons to add this.

  1. Easier maintenance. Every time I use the ValuesAllowed attribute I find myself having to add every value except for one or two. I have yet to find a scenario where inclusive logic makes sense. Only having to add one value of a large enum list would make life so much sweeter.
  2. Better extension support for field option/enums. ValuesNotAllowed would only affect the base apps enum values. Extensions can't extended the ValuesAllowed attribute so it makes me often avoid using this very useful attribute.
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team

Comments

J

I have exactly the same needs. It would be much more convenient to hide a few elements rather than spending a lot of time adding the new value in all pages

Category: Development

J

Additionally, extensions should be able to add their own "ValuesNotAllowed" fields to further control this.

Category: Development