When we add a joined data source to a form (to display some related data), the system will try to save it together with the parent record. To avoid it, we need to overwite write() method (to do nothing) and validateWrite() (to always return true). A typical example is InventDim data source in SalesTable form.

Junior developers always struggle with it, because it's counter-intuitive.

If we could simply set a data source as read-only, it'd be all much easier to do and understand.

Category: Development