Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

FK Replacement failed in AX2012 in specific company

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

Just to give you little background of my error:

Created a new company RT1 And imported  some data(done by functional guy, not me).

Now When I am trying to post (invoice) project purchase order , I am facing   below error:

 

 

Error      Message (21:30:11)         SourceDocument object not initialised.

 

Stack trace

 

(S)\Classes\ProjectSourceDocumentLineItemHelper\projTransType - line 18

(S)\Data Dictionary\Tables\ProjectAccountingDistribution\Methods\transactionCurrencySalesAmt - line 31

(S)\Classes\ProjFundingEngine\createProjTransFromProjDist - line 36

(S)\Classes\ProjFundingEngine\fundingLimitTrackingProjDist - line 22

(S)\Classes\ProjFundingEngine\fundingLimitTrackingAccDist - line 7

(S)\Data Dictionary\Tables\AccountingDistribution\Methods\Update - line 9

(S)\Classes\PurchFormletterParmDataInvoice\updateSourceDocumentLines - line 47

(S)\Classes\PurchFormletterParmDataInvoice\reArrangeUpdateParmLine - line 19

(S)\Classes\PurchFormletterParmData\reArrangeLines - line 105

(S)\Classes\formletterParmData\doReArrange - line 15

(S)\Classes\formletterParmData\reArrange - line 8

(S)\Classes\PurchFormletterParmData\reArrangeServer - line 7

(C)\Classes\PurchFormLetter\reArrange - line 21

(C)\Classes\PurchFormLetter\run - line 11

(C)\Classes\PurchFormLetter\main - line 67

(C)\Classes\FormFunctionButtonControl\Clicked

 

Error      Message (21:30:11)         Removal of suspension of recId allocation for table VendInvoiceInfoTable has failed.

 

When i did some debugging I found out as shown below :

I have found that in the class method PurchFormletterParmDataInvoice.insertSourceDocumentHeader - line 11, there is reserved one recId for a row on the SourceDocumentHeader.

But I am facing this problem only in newly created company . And  NOT IN ANY OTHER COMPANIES. Then looks like a data issue, not sure..

 

Kindly help.

 

thanks

Manoj Parashar

 

*This post is locked for comments

  • MFD Profile Picture
    MFD 5 on at
    RE: FK Replacement failed in AX2012 in specific company

    Hi,

    Does anyone know how to solve this issue? I have the same problem. It looks like a data problem. New invoices can be posted, but old transactions get stuck with the above mentioned error.

  • RE: FK Replacement failed in AX2012 in specific company

    Facing the same error here, only for one user (even more bizarre). Found this thread here - worth to have follow-up. dynamicsuser.net/.../60168.aspx.

  • skaue Profile Picture
    skaue on at
    RE: FK Replacement failed in AX2012 in specific company

    Not really possible to view that screenshot. Can you repost it with a higher resolution?

  • DRT Profile Picture
    DRT 10 on at
    RE: FK Replacement failed in AX2012 in specific company

    We are receiving the same error as well when createing Invoice Orders in Batch

  • Derek Broere Profile Picture
    Derek Broere 5 on at
    Re: FK Replacement failed in AX2012 in specific company

    Did anyone found the cause of this error? I am getting the same when trying to post a purchase invoice using a service, but the same code running in AX trough a job does not error ?!?  

    Thanks

    Derek

  • Anand Menon Profile Picture
    Anand Menon 30 on at
    Re: FK Replacement failed in AX2012 in specific company

    Does this issue got solved? I am also getting the same error on vendinvoiceinfotable while doing purchase invoice through AIF document service. Please reply

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans