How to create setup for database logging on setup-tables for MsDyn365FO

How to create setup for database logging on setup-tables for MsDyn365FO

This post I want to talk about and solve some pain points were are facing in every project when it comes to the setup of database log. As you my now database log in Microsoft Dynamics 365 for Finance and Operation is implemented with SQL triggers, so it has a smaller footprint in comparison to previous versions. Nevertheless I would not recommend to activate it for transaction tables.

We had the problem that in every project we got the task to activate database log for "setup tables" and in every project we had a discussion about what those "setup tables" are. When the list of "setup tables" were available the next challenge occurred: "How to get those table activated?". The problem here is that the client only shows you the label (in the user language) or the technical name for each tables. So to activate a bigger list of tables will take some time. We got rid of this problem by providing a class to activate database log for our best practice tables. You can find the class behind the following link and I′m very interested in tables you would add to this list: https://github.com/PaulHeisterkamp/d365fo.blog/blob/master/Metadata/D365FoBlog/D365FoBlog/AxClass/DfbActivateDatabaseLog.xml

To call the logic of the class I′m using the SysClassRunner URL parameter: https://usnconeboxax1aos.cloud.onebox.dynamics.com/?mi=SysClassRunner&cmp=USMF&prt=initial&cls=DfbActivateDatabaseLog

Please be aware, that if you run this class in production or in any other environment the setup of the database log can lead in locking/blocking because it will add triggers to the SQL tables which will lead to a schema lock.

Valery Moskalenko

D365 DevOps Manager at Ciellos

4 年

Thanks!??I have a question.? Why do you add CustTable as table? "tableIds.addEnd(tableNum(CustTable));".? But then add only one field CustTable.CashDisc?? "fields.addEnd(fieldName2Id(tableNum(CustTable), fieldStr(CustTable, CashDisc))); tableFieldMap.insert(tableNum(CustTable), fields);"? ?? Is adding field make sense when you have added the whole table? Or it's for learning purposes??

回复
Haytham Said

Dynamics 365 F&O Program Manager - Platform runtime at Microsoft

4 年

Thanks for sharing, a new change is coming

回复

We had also same "question" and solved it by creating a custom data entity to be able to manage data base log configuration. Nice share... Thanks!

Arun Garg

Microsoft Dynamics 365 F&SCM Technical Architect | 3x Microsoft MVP | 2x Microsoft MCT | MVP Alumni

4 年

Data logging you mean for data entities change tracking???

回复
Sarika Srivastava

MCP || Senior Consultant at Capgemini |Ex-TietoEvry | Ex-Infosys | Ex-Accenture

4 年

I have set it up for my last project but it does not work as expected ,can anyone check on this once ,can be a bug also.

回复

要查看或添加评论,请登录

Paul Heisterkamp的更多文章

社区洞察

其他会员也浏览了