Search code examples
axaptadynamics-ax-2012x++dynamics-ax-2012-r2

How to update temp table data during run time AX 2012


I'm new to X++ development. I'm trying to add a field in Vendor aging report. It was done as excepted.

my problem is updating the field value during run time.

Scenario, We have a Invoice field contain "AA_BBBBBB". What I need to do is I need to split the value as AA, BBBBBB and update BBBBBB to invoice field and AA to new field (Invoice type).

Issue, Once i got the values to temptable VendAgingReportTmp in the method VendAgingReportDP\insertVendAgingReportTmp, I'm tried to update the above scenario but code is not selecting the records from VendAgingReportTmp. Can someone help me to get this thing done.


Solution

  • I got a solution by adding below,

    • Added InvoiceType field to temptable VendTmpAccountSum Since this is declared as global variable.
    • Updated our custom Invoice type to InvoiceType field in VendTmpAccountSum.
    • Then insert the whole data to VendAgingReportTmp from VendTmpAccountSum table by using insert_recordset to increase the performance.

    Thanks,