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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error : You cannot insert a record from another table

(0) ShareShare
ReportReport
Posted on by

I try to copy all the Records from a Table named "T1" (say) to a Table named "T2".

Now T1 already existed. I created T2 by copying all the fields from T1. Now when I try copying and pasting T1 records into T2, I get an error "You cannot insert a record from another table".

In the Properties section of the Table T1 & T2, the "PasteIsValid" property is marked YES.

Could you please let me know, what am i doing wrong. I would really appreciate any answer. Thank you.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Error : You cannot insert a record from another table

    Hello,

    For this thing you can create a "Processing Only" Report and through code you can copy the records from T1 table to T2 table.

    In this report you can assign the T1 fields to T2 table fields and then you can use "tablerec(T2).INSERT;

    to copy the records from T1.

    According to me this is the best way to do it and it will not effect the performance also.

    Hope this will help you :)  

  • Community Member Profile Picture
    on at
    RE: Error : You cannot insert a record from another table

    Thanks Jon. I think I would agree with you on this. I could have encountered this error because of the code in the Field Triggers. But this was not the case here as T1 did not have any code in any of the Field Triggers. Thanks anyways. Now I can cross out "Field Trigger Code" in the future.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Error : You cannot insert a record from another table

    Thanks Vishal. It turns out that I had accidentally (I don't remember when) changed the length of one of the fields in T2.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Error : You cannot insert a record from another table

    There must be some difference in fields datatype, length (or may be Key), otherwise it should definitely work.

    Use Save as option and create the copy of T1 table as T2 and then check.

  • Suggested answer
    keoma Profile Picture
    32,729 on at
    RE: Error : You cannot insert a record from another table

    if you copied also the code in the triggers, remove the code in table t2, then try again. the error could come from a function in table t2 with paramater of type t1.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans