Open form saves data by expanding second tab page and throws errors

I have a form ANXTMSCustInvoiceTableCreate.

Pattern: Dialog - Fast Tabs

It contains four tabPages.

The tabPages don’t have DataSources.
The elements inside one TabPage have the same DataSource, but each DS appears inside only on eTabPage.

So when I change from one TabPage to an element in another one, I change the DS and data are saved.

Opening the Form, the first TabPage is expanded and waiting for input.

But if one of the other ones is expanded while opening the form, I receive errors, because it tries to save the content of the first tabPage.

Saving fails, because there are empty mandatory fields.

So what I need is a solution to prevent saving when opening the form.

When I set the tabpages two to four to “Fast Tab Expand” = No, it works. Opening one of hte tab pages throws the same error because of the empty fields.

Setting a breakpoint in the validateWrite method of the first TabPage’s dataSources gives this call stack

Dynamics.AX.CargoSuiteTMS.Forms.ANXTMSCustInvoiceTableCreate.netmodule!Dynamics.AX.Application.Forms.ANXTMSCustInvoiceTableCreate.FormDataSource.ANXTMSCustInvoiceTableTmp.validateWrite() Line 406 X++ [External Code] Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRun.selectControl(Dynamics.AX.Application.FormControl _control) Line 3041 X++
[External Code]
Dynamics.AX.ApplicationPlatform.2.netmodule!Dynamics.AX.Application.FormRunConfigurationViewTabPageExpand.apply(Dynamics.AX.Application.FormControl _control, string _propertyValue) Line 20 X++ Dynamics.AX.ApplicationPlatform.2.netmodule!Dynamics.AX.Application.FormTabPagePersonalization.applyViewProperty(Dynamics.AX.Application.FormRun _formRun, Dynamics.AX.Application.FormControl _parentControl, Dynamics.AX.Application.FormControl _control, string _property, string _propertyValue) Line 70 X++
Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormControlPersonalization.applyForView(Dynamics.AX.Application.FormRun _formRun, Dynamics.AX.Application.FormControl _parentControl, Dynamics.AX.Application.FormControl _control, string _property, string _propertyValue) Line 160 X++ Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRunConfigurationPropertyClass.applyForView(Dynamics.AX.Application.FormRun _formRun, Dynamics.AX.Application.FormControl _parentControl, Dynamics.AX.Application.FormControl _control) Line 562 X++
Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRunConfigurationClass.rolloutView(Dynamics.AX.Application.FormRun _formRun, bool _applyQuery, bool _keepRecordPosition, bool _showViewQueryConflictMessage, bool _refreshAddFields) Line 2544 X++ Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRunConfigurationHelper.applyInitialConfigurationView() Line 1818 X++
Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRunConfigurationHelper.loadInitialView() Line 1380 X++ Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRun.run() Line 715 X++
Dynamics.AX.CargoSuiteTMS.Forms.ANXTMSCustInvoiceTableCreate.netmodule!Dynamics.AX.Application.Forms.ANXTMSCustInvoiceTableCreate.run() Line 195 X++ [External Code] Dynamics.AX.ApplicationPlatform.2.netmodule!Dynamics.AX.Application.MenuFunction.run(Dynamics.AX.Application.xArgs _args, bool @_args_IsDefaultSet) Line 112 X++
Dynamics.AX.CargoSuiteTMS.Forms.0.netmodule!Dynamics.AX.Application.Forms.ANXTMSCustInvoiceTable.callANXTMSCustInvoiceTableCreate() Line 18 X++ Dynamics.AX.CargoSuiteTMS.Forms.0.netmodule!Dynamics.AX.Application.Forms.ANXTMSCustInvoiceTable.FormDataSource.ANXTMSCustInvoiceTable.create(bool _append, bool @_append_IsDefaultSet) Line 217 X++
[External Code]
Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRun.createRecord(string _formDataSourceName, bool _append, bool @_append_IsDefaultSet) Line 2790 X++ [External Code] Dynamics.AX.ApplicationPlatform.1.netmodule!Dynamics.AX.Application.FormRun.task(int _p1) Line 1175 X++
[External Code]

What I see is a selectControl in the second line.

_control in Method applyViewProperty() is one of the tabpages, which is opened here.

So plan A is to prevent saving during start up process.
The run() Method is passed before it happens.

Is there any option to set a “notSaveFlag” and unset it anywhere?

Plan B is to set “Fast Tab Expand” = No. But is not the default in all our other forms, as far as I know them.

So does anybody have an idea to solve this?

thank You in advance

Gerhard