Hi All DAX Experts,
I have a serious problem regarding posting Invoice. Initially everything works fine. We have developed customizations and everything is working fine. Since we have done some workflow customization, we have compiled the whole appl and run the CIL. It is generated successfully. Here comes the problem. Now we are checking for
- Product Receipt - Stack trace error came and it was not posting. So i have unchecked the CIL option from tools → development - > run code from CIL for business…
So now Product receipt posted successfully.
- Now we are trying to post invoice . It throws the error " A critical error has occurred in function InventCostInputAmount::getInputAmountFromDistribution." - > this method was called in class PurchInvoiceJournalPost → post inventory method → inputamount calculation.
I have debugged and what is happening is →
After Packing slip-> when i click the Invoice button , two recorsd have been created in Source Document Header and Source Document Line Table and the form opens.
Now what is happening is → after i give Invoice number , consignment number and click the Post Invoice button, again 2 records have been created in Source Document Header and Source Document Line and in the InventCostInputAmount::getInputAmountFromDistribution method, it was searching for the Source Document Line record which was created first time when i click the Invoice button after Packing Slip… but that recid is not there in the Souce Document linc since those records are deleted automatically and those Recid was there in VendinvoiceinfoLine table and since no rec in SDLine table it returs 0 and throws this error and Invice is not hjappening.
This is the standard process and it is not happening . Somebody please help me to resolve this issue …