Skip to main content

Notifications

Announcements

No record found.

Business Central forum

AL scripting Purchase line thows error : Internal_InvalidTableRelation

Posted on by 7
Hello,

I want to create Purchase Credit Memo.

First I crate Purchase Header for that and that is getting created successfully and I get a document no.

using same document no. I try to create a Purchase Line. and that gives me error :
 
error: {
  code  :  Internal_InvalidTableRelation,
  message:  The field Document No. of table Purchase Line contains a value (38212) that cannot be found in the related table (Purchase Header)
}

Purchase Header:
 

Purchase Line :




Can someone please check above and help me understand why this error is coming ? as I have Record in Purchase Header but still error says Header Record not found.

Let me know if more details required.

Thanks.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans