and once again an axapta-question ( running on ax 2009 and sql-server 2008 r2 ):
which is exactly the point of time, when inserted or updated datasets are stored in the regarding database?
the aim is to call a stored procedure on the sql-server which transfers data from the ax-tables ( eg inventtable ) to another ( not generated with axapta ) table. executing the stored procedure via odbc from axapta on one of the table-methods ( even after super() call ) triggers the stored procedure, but the data which was just added or modified in ax isn’t found while selecting via smss ( select * from dbo.inventtable ).
the only place i know yet where the data is already stored in db is on the methods on the datasource on the regarding form, but this would be quiet ugly, since the data could be edited via n forms from ax.
so is there a way to put the call on the table instead on the forms’ datasources?
thanks for hints in advance!
The AX data is “stored” in the database at the point of
doInsert()/doUpdate()orsuper()calls ininsert()/update()methods.However, as Jay mentioned, the records will not be visible to other transactions (unless you explicitly allow dirty/uncommitted selects). So it may not be visible to your stored procedure.
I would not recommend calling stored procedures in
insert()/update()anyway as this has performance implications, and you are now depending on yet another database being alive!The way to go:
Log table layout (one of millions):
Recommendations:
DATAAREAID(must be spelled this way) as well.LogStatusto 1 before the join and to 2 after the join and update.