16.01.2014, 18:11 | #1 |
Участник
|
sashanazarov: Bug in the source document framework (AX 2012 CU5)
Источник: http://sashanazarov.blogspot.com/201...mework-ax.html
============== There was an issue in SouceDocumentLineItem class, that I had to fix recently. The failing scenario looked something like this:
Apparently, the main account for the tax amount was not found. Because of the broken accounting distribution, the PO could not be processed, and the following error message popped up:
After some hours of debugging, I found that everything starts in this method: Here, we have a "select forupdate", that loops through TaxUncommitted table records and calls submitSourceDocumentLine instance method: The taxUncommitted.submitSourceDocumentLine call ends up here: In this constructor method, the sourceDocumentLineItem class instance is first initialized from the _sourceDocumentLineImplementation parameter (which is actually a TaxUncommitted record buffer), and then put to cache (see SysTransactionScopeCache::set call). Let's look closer at the sourceDocumentLineItem.initialize method in the debugger. The sourceDocumentLineItem variable (which is actually TaxSourceDocSublineItem class instance), has a member-variable of Map type, which is initialized with the TaxUncommitted record buffer (selected for update in the while-loop, as we have seen before!): The problem is that by the time the sourceDocumentLineItem class instance is fetched from the cache later in the business logic, the TaxUncommitted cursor is null, so the taxMap member-variable in the cached instance is empty and things like tax code cannot be determined anymore. The fix was to use xRecord.data() call to separate the map from the original table buffer: I will report the issue to MS Support. Источник: http://sashanazarov.blogspot.com/201...mework-ax.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|