Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SourceDocumentHeader and SourceDocumentLine update failure with converted Purchase Orders

(0) ShareShare
ReportReport
Posted on by 804

I hope someone has seen this before and has found a solution. New purchase orders do not generate the cannot update SalesDocumentLine record but some of the converted ones do. We get the unable to update SourceDocumentLine followed by the update canceled messages. This is during confirmation or just viewing the distribution.

The SalesDocumentHeader and SalesDocumentLine references in the PurchTable and PurchLine appear valid. Each purchase table order with one line has a source document header record and a source document line record. The purchase line record has a source document line record as well. Deleting and reading the line does not fix the problem so it may be header based.

For some reason the source document line record keeps trying to add an AccountingDistribution record even though the correct line distribution record is already there.  

The failure is in SourceDocumentLineState\updateReferenceData on the line:

sourceDocumentLine.update();

I have found other instances of the problem on the web but no definitive solution with the suggestion to try and regen the CIL.

Any suggestions would be helpful. At the point of the failure the SourceDocument classes are 11 deep so diagnosis is real difficult.

Thanks!

Konrad

*This post is locked for comments

  • Rafael Ruiz J Profile Picture
    10 on at
    RE: SourceDocumentHeader and SourceDocumentLine update failure with converted Purchase Orders

    Recently I had the same issue. I followed the usual path for this message, but generated from SOP module (Delete records from SY00500 where the BACHNUMB = USER). In this case I haven't a BACHNUMB with the name of the user, but I found a Batchnumb called RMPMXFR +User and in the field USERID there was the name of the user. There was 2 records, one for PM series and one for RM series.


    SELECT * FROM SY00500 WHERE USERID='BLOCKEDUSERNAME' 

    *Change BLOCKEDUSERNAME for the name of the user.

    I made sure there were no transactions in work in PM and RM assigned to those BACHNUMB's and in addition that the NUMOFTRX field is zero in the SY00500 and I removed the 2 records.

    This allowed me to open the window again.

  • Community Member Profile Picture
    on at
    RE: SourceDocumentHeader and SourceDocumentLine update failure with converted Purchase Orders

    Hi Konrad,

    Could you explain what the minor code fix was in your case?

    I'm having the same issue on a D365 enviroment but with a purchase order I create manually. 

    Thanks,

    Ciprian

  • Konrad U Profile Picture
    804 on at
    RE: SourceDocumentHeader and SourceDocumentLine update failure with converted Purchase Orders

    Update: This was one of those problems that ultimately was resolved by a minor code mod allowing the error to be bypassed since it was only on converted orders via DIXF.

  • AhmedMgamal Profile Picture
    75 on at
    RE: SourceDocumentHeader and SourceDocumentLine update failure with converted Purchase Orders

    Is the purchase order generated from purchase requisition, if yes check source document line table for the pr line the status should be completed,

    If your issue is regenerated and have a repro steps try to remove your customization and check again

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 50

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Featured topics

Product updates

Dynamics 365 release plans