This is causing for one field only. It looks weird as I haven't seen this issue before.
Please let me know how to figure out this issue.
Thanks,
Raziq.Ali
*This post is locked for comments
This is causing for one field only. It looks weird as I haven't seen this issue before.
Please let me know how to figure out this issue.
Thanks,
Raziq.Ali
*This post is locked for comments
Hi Raziq,
Kindly unmark, any reply from my side as non-verified. As none of my replies are accurate to fix issue. Its due to fact that yet we were unable to identify/ reproduce exact reason of issue.
Marking my answer as verified, is misleading for new comers, who might be searching this thread in future.
Keep only your findings as Verified answer & change my replies from Verified to non-verified.
Hi Sohaib, I got solution for this issue. Here you go...
This is happening because of the combination of standard code, and existing records.
There is this code in the SalesInvoiceDPBase class:
public void processReport()
{
if (!this.useExistingReportData())
{
this.setTableConnections();
this.createData();
}
}
The this.useExistingReportData() method has the following line of code:
localSalesInvoiceHeaderFooterTmp = SalesInvoiceHeaderFooterTmp::findJourRecId(jourRecId);
Basically, if it is able to find a record in the SalesInvoiceHeaderFooterTmp table for the given Journal Rec Id, it will use the existing data, instead of creating new data. Since my field is new, it is not populated on the existing data, hence I see blank values on the “first” run (I put that in quotes, since this is not really the first time this report has been run for this journal… just the first time during my testing).
At the end of the “first” run, the report does the correct thing, and deletes the data out of the SalesInvoiceHeaderFooterTmp table, leaving it empty for the second run. Since there is no existing data in the second run, it builds it all from scratch (this time with my new value).
Thanks,
Raziq.Ali
Hi Raziq,
I understand how invoicing works in AX. Also I do understand issue form “end user’s” perspective.
My question is reproducing issue, in technical terms. How I can reproduce issue, technically. What I should code/customize etc. to produce this issue.
Below are the steps which I followed for SO-0007106 to reproduced it in DEV.
When I click on Invoice for this SO, it opens Invoice journal form
When I click on preview/print to generate report.
It has generated report with blank packing list number for first time which I attached for reference.
When I run again for second time, it rendered perfectly which I attached for your reference.
Report is rendering perfectly from second time onwards.
Thanks,
Raziq.Ali
interesting.
can you kindly provide me steps to re-produce issue. doing so, can help me to debug on my DEV box
I meant code is also stepping into debugger mode from second time onwards but not from first time.
probably because reports run through BI services which is an AIF service and runs under CIL.
To debug it you need to follow certain process which you can find on TechNet.
I kept my debugger to find out cause but it is not stepping in createdata method of SalesInvoiceDpBase class for first time. So, very hard to find root cause I guess.
SalesInvoiceDP is an extended class of SalesInvoiceDPBase
basically method insertIntoSalesInvoiceTmp is called from createData method of insertIntoSalesInvoiceTmp .
your event says that code should be called before insertIntoSalesInvoiceTmp .
can you kindly debug SalesInvoiceDPBase to know how and when insertIntoSalesInvoiceTmp is being called.
This is pre event handler added to insertIntoSalesInvoiceTmp method of SalesInvoiceDP class.
André Arnaud de Cal...
292,863
Super User 2025 Season 1
Martin Dráb
231,723
Most Valuable Professional
nmaenpaa
101,156
Moderator