Single NEW / CREATE button for 2 Data Sources

Hi AXperts,

 

Is it possible, to place a NEW button (for creating NEW records) in Action pane, such that if I click on a tab (TAB A), associated to DATASOURCE A, and click on NEW button the record should create in that table. 

And if I click on Tab B - different tab, associated to different DATASOURCE (DtaSource B), and clicking NEW button, should create a new record in TAB B.

 

Please guide me , how is it possible ?

 

Regards,

Pooja

  • Override pageActivated method of both tab pages and in those methods, set the form's default datasource.
    Example:
    element.defaultDataSource(fisrtDataSource_ds); // in first tab page activate method.
    element.defaultDataSource(SecondDataSource_ds); // in second tab page activate method.
Related
Recommended