web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SourceDocumentLineItem object not initialized

(0) ShareShare
ReportReport
Posted on by

Hello everybody, 

we have an error when trying to post a PO confirmation journal. 

The error is " SourceDocumentLineItem object not initialized. Stack trace: (S):\Classes\SourceDocumentLineItem\newFromSourceDocumentLineImplementation

When this occurs the first time, many other PO begin to have the same problem.

We saw that the problem is related to the tax uncommited but we have no idea about what could be the reason.

Any ideas?

Thank you

*This post is locked for comments

I have the same question (0)
  • Klaas Deforche Profile Picture
    2,433 on at

    I have a very similar (or the same) problem, when applying a prepaypement.

    The tax uncommitted record cannot be retrieved in the method SourceDocumentLine.getSourceDocumentLineImplementation() because it has been deleted at the end of the following method: Dictionary\Tables\TaxUncommitted\Methods\deleteForDocumentHeader

    I'm still trying to figure out why...

    If someone has an idea...

  • Community Member Profile Picture
    on at

    Hello,

    any success on this ?

    Regards,

    Kunal Patel

  • Codehunter Profile Picture
    10,280 on at

    please anybody knows the reason for that,post it

  • Community Member Profile Picture
    on at

    Its all bout error with data, there should be proper record in source document header, source document line and purchase order,

    there is relation between source document header and purcahse order,

    also source document line with purchline, if you will check in some records there will be source document line records but no header records.

    in my case i just created header record manually to make it works.

  • Husna Yusuf Profile Picture
    1,094 on at

    I have same case with you.

    i takes one record which can go to processed with normal.

    from this record,i takes 2 value from two field, PurchTable.SourceDocumentHeader and Purchtable.SourceDocumentLine and one value from PurchLine.SourceDocumentLine.

    then i compare them with SourceDocumentHeader.recId == purchtable.sourcedocumentheader.

    and SourceDocumentLine.recId == purchtable.sourcedocumentline.

    after that i select SourceDocumentLine.Recid which same with PurchLine.Sourcedocumentline.

    and everyrow have a same value.

    i do this way for the record which got error "" SourceDocumentLineItem object not initialized. Stack trace: (S):\Classes\SourceDocumentLineItem\newFromSourceDocumentLineImplementation etc etc"

    but theres nothing wrong/mismatches/blank record in their relation..

    and if click the button "View distribution" this error is appear also.  

  • Community Member Profile Picture
    on at

    Hi all i am also facing same problem When the user create a freetext invoice and enter an invoice account

    they receive a stack trace

    SourceDocumentLineItem object not initialized

    Stack Trace

    Classes SourceDocumentLineItem newfromSourceDocumentLineImplementation.

    Line 27

  • Community Member Profile Picture
    on at

    I just wanted to put in my two cents. I have seen this problem all over these boards. I have seen more me too's than any answers.

    Well I was looking at this problem. Looked at it for a while. The backend seemed fine. Checked the tables, rerun the flow of the document.

    Then it occurred it is a process issue not a system issue. Turns out that there is an item that needed to be tax exempt that is why it was failure with that error. So go back and check your process to make sure you made all proper selection. There might have been a step missed. This started from a credit return to vendor. Under Invoice details the tax must be set to exempt, at least in my case. 

    So now the invoice goes through without throwing the "SourceDocumentLineItem object not initialized"

  • Community Member Profile Picture
    on at

    Hello friends,

    I have got the similar error while confirming purchase order.

    I have checked both SourceDocumentHeader and SourceDocumentLine data and found that there is data inconsistency. AccountingStatus field is having problem some times.

    In my case AccountingStatus in Line was "Complete" and in Header it was "In process". I have changed the AccountingStatus in header as "Complete" and I was able to confirm the PO.

    Hope this help you out. 

    Regards,

    Shantaram

  • Community Member Profile Picture
    on at

    we are getting  ITaxDocumentline object not initialised during the time of multipline line journal posting.

    Found out temporary solution for voucher posting in AX 12 . we have made the following actions at the time of journal voucher posting. 

    1.  Modified  Transaction Date  in first line of existing journal vouchers and closed  the Journal.
    2. Open the same journal voucher , changed transaction actual date and post  the voucher.
    3. This is working 

    But still we do not know the root cause for the same. 

    Krishna

  • Community Member Profile Picture
    on at

    Hello,

    I came across the same issue with this object failing to initialize

    When debugging I found that the ax was trying to initialize this object using a purchReqLine that had a broken relation.

    The related purchReqLine would return NULL and cause the crash.  

    \Classes\PurchOrderLineSourceDocumentLineItem\initSourceDocumentLineMatchingList

    35: if (purchReqLineRefId)

       {

           purchReqLine = PurchReqLine::findLineRefId(purchReqLineRefId);

           sourceDocumentLineMatchingList = SourceDocumentLineMatchingFacade::addSourceDocLineItemToList(this, purchReqLine);

       }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans