I am writing a program to upload historical credits data that were present in an excel sheet. One column has a main account listed. These credits will be going as a free text invoice. this main account number has to sit in custinvoiceline table and the credit amount has to reflect the correct G/L account.
I am using the line of code:
custInvoiceLine.LedgerDimension =MainAccount::findByMainAccountId(conPeek(readCon,15)).RecId;
custInvoiceLine.initFromCustInvoiceTable(custInvoiceTable);
When i load the excel file, there are some random main account values sitting in the line field of free text invoice.
What I have understood is, we have created the main account a week back, but the posting dates were in February and March. Is this the reason for the main account not populating correctly on the free text line?