It would be useful to be able to add an interface to a record. This would enable to reduce a lot of the code to write. For example a headerlLine construct always contain a lot of duplication. There could be an Codeunit that is able to do certain things with any record that implements the Header Line interfaces.
In general it would be good to be able to define fields that are required but for a first version just make sure procedures exists would be sufficient. So instead of requiring the field "Line No." It would be good enough to require the methods GetLine and SetLine.
Comments
This sounds like an Abstract Class (abstract table?) concept more than an interface, but I am still here for it!Sales Header, Sales Header Archive, Purchase Header, and Purchase Header Archive for example, might inherit from the "Abstract Table" Commerce Transaction Header or something similar, which would define the shared fields as well as any shared functions.It would probably mean a new datatype of Abstract Record rather than an extension of the Interface datatype, to keep with the conventions that an interface cannot implement properties (look up "Interface Keyword C#"), but instead comparing a record to a C# class which can implement properties (fields in AL), the appropriate addition in AL would be supporting the Abstract Keyword (look up "Abstract Keyword C#" as a TableType value and having inheritance between record definitions, or having support for the implements keyword towards a new abstract type.Note: I did have direct links to the Microsoft documentation for the interface and abstract keywords but ideas doesn't like links (very sad).
Category: Development
		