Question

I have some custom fields in the SalesTable form where I have overridden the lookup method to fill a combobox. I have also overrode the form's initValue method of my custom data source to automatically fill in the default values of these fields when no value is present.

My issue is this: one of those fields will not be editable by the end user and requires a value. Not all records have this value filled in currently, so when an existing record is edited AX throws an error because the field requires a value and can't be modified. I basically need to detect when the form starts up whether or not there is a value and fill it in if not. Any advice on where/how to do this?

Was it helpful?

Solution

Depending on the kind of data that you want to store in that field you could fill the old records field with a default value so you don't need to create a validation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top