I’m developing a custom software, working with data coming from Axapta 3.0 SP3. I would like to be able to receive program notifications when records of needed types are changed within Axapta. What are my options here? I wouldn’t like to employ third-party solutions.
Thank you for the answer. Log monitoring is feasible but requires some kind of translation from database objects to business objects. I guess, implementing some mechanism from within axapta would give better results in terms of types compliance and configuration changes survival. As far as I know, no alert service is available in axapta 3.0 sp3, am I wrong?
Thank you for your answer, it is very informative. The solution which I came upon is to override update delete and insert methods on each table I interested in and put changes information to a separate dedicated table, which then is read by polling from Axapta Business Connector. There are only about ten such tables, so it seems log monitoring in this case would indeed be too much.
Do you see there is something to be improved in my approach, given small number of monitored objects? Also is there a way to notify ABC client from inside Axapta?
In order to provide educated reply, I would require the actual table list.
But generally speaking depending on type and nature of tables, there are some risks in overriding ‘insert’ methods at table level.
Let us assume one of the tables is of transactional type and used in scenarios like high volume import. Then chances could be that records might get inserted into this table by ‘array insert’. It is done this way because array inserts speeds up insert operations exceptionally quicker. But if the table’s insert method is overrided, then it will fall back to standard record by record insert.
Other scenario could be - if insert takes place through ‘doInsert’ method, this will by pass ‘insert’ method on the table. This will be applicable for ‘doUpdate’ and ‘doDelete’ methods as well i.e. ‘update’ and ‘delete’ methods will be by passed.
Regarding suggestions for improvement - if possible I would try to move this process into SQL Database. For example -
Tables in Ax contains properties like created date / time, modified date / time etc. This property could be switched on for your list of tables
Subsequently in SQL, a stored procedure could be written to pick up data from these tables on regular interval. With some little thinking, this could clevery written in such a way that it picks up only those records that were changed since last time SP was run
Obviously this might not provide real time benefit but could provide something close to that.
Thats a very valuable input, thank you very much. Entities I interested in are Customers, Customer Representatives, Goods, Prices, Stock and Orders. The software is supposed to list mentioned entities and place orders to axapta, which is rather popular type of project. There is an underlying database which should be maintaned in sync with axapta data.
Our initial intent was actually implementing the logic on database level. Though, we have no previous experience in axapta and considered this approach a risk. Some systems perform massive database metadata change in response to configuration adjustments, so we decided to stay at (possibly) safer side and implement on business level.
Does axapta perform bulk inserts on general basis? If this is a special case, we could live with that. Is it true that to be able to capture update events for sure on business level, we would have to override both Update/DoUpdate methods, or is there something more to it?
The database approach is very attractive, although how is it in regard to axapta best practices? For realtime we could add triggers to interested tables and call an external dll from stored procedure to notify our software.