Hi,
I am using AX 2012 R2 CU7. When I am trying to Delete the Purchase Order Line by clicking on “Remove” button, I am getting the below error:
SourceDocumentAmount object not initialized.
Stack trace
(S)\Classes\AccountingDistributionProcessor\initVariablesForMatching - line 8
(S)\Classes\AccountingDistributionProcessor\processActionUpdate - line 52
(S)\Classes\AccountingDistributionProcessor\processExistingDistributions - line 46
(S)\Classes\AccountingDistributionProcessor\distribute - line 31
(S)\Classes\AccountingDistributionProcessor\process - line 45
(S)\Classes\AccountingDistributionProcessor\distributeSourceDocumentLineItem - line 66
(S)\Classes\SourceDocumentLineState\distribute - line 17
(S)\Classes\SourceDocumentLineStateDistributed\doMaintenance - line 11
(S)\Classes\SourceDocumentStateBase\maintainState - line 22
(S)\Classes\SourceDocumentStateBase\performTransitionOrMaintenance - line 15
(S)\Classes\SourceDocumentLineState\performTransitionOrMaintenance - line 35
(S)\Classes\SourceDocumentStateBase\transitionTo - line 15
(S)\Classes\SourceDocumentProcessorBase\submit - line 11
(S)\Classes\SourceDocumentLineProcessor\submitSourceDocumentLineImplementation - line 95
(S)\Classes\SourceDocumentProcessorFacade\submitSourceDocumentLineImplementation - line 26
(S)\Classes\PurchLineType\updateDistribution - line 9
(S)\Classes\PurchLineType\deleteSoft - line 40
(S)\Classes\PurchLineType\delete - line 122
(S)\Classes\PurchLineType_Purch\delete - line 21
(S)\Data Dictionary\Tables\PurchLine\Methods\Delete - line 12
(S)\Classes\xRecord\dbOpInTransaction
(C)\Classes\FormDataSource\delete
(C)\Forms\PurchTable\Data Sources\PurchLine\Methods\delete - line 24
(C)\Classes\FormRun\task
(C)\Classes\SysSetupFormRun\task - line 20
I have performed the Compile Forward and FULL CIL to all the above classes involved in the error but there are no errors. I have even debugged but as of now I am unable to catch the exact point. However, the code that is throwing the error is as shown in the below snapshot.
Just a thought that I observed, can it be data issue, as it is happening only for a particular PO and I am able to delete lines from other PO without any issues.
I tried to troubleshoot to look for data inconsistency but didnt get anything yet. I think I need to to troubleshoot more into data inconsistency for this particular PO. Any idea in this direction?
Any suggestion/help would be highly appreciated.
Sincerely,
Muneeb