How to copy a record between two tables

a.mouttou
Member Posts: 18
hi all,
I'm trying to copy the record of the table 5082 to a user custom table
50011 so i've made a report with the 5082 table.
In the OnAfterGetRecord i put this C/SIDE
//stat : record : 50011
stat.init;
stat.copy("Value Entry");
But i've got a Message telling me that all filters can't be copied at the same time and that only record from the same table can be copied.
Did anyone already try something like this.I don't wanna copy each fileds betwenn the twotables.
Thanks.
I'm trying to copy the record of the table 5082 to a user custom table
50011 so i've made a report with the 5082 table.
In the OnAfterGetRecord i put this C/SIDE
//stat : record : 50011
stat.init;
stat.copy("Value Entry");
But i've got a Message telling me that all filters can't be copied at the same time and that only record from the same table can be copied.
Did anyone already try something like this.I don't wanna copy each fileds betwenn the twotables.
Thanks.
Waiting for Dynamics Nav V5
France
France
0
Comments
-
If you copied table 5082 as table 50011, then you may have added fields to table 5082 that have not been added to table 50011. When you do a COPY, navision will attempt to put the values of all fields in the source table into identical fields in the target table. When it doesn't find these fields, you get the error you mentioned.
You can only use the COPY command if both record variables are of the same type, and then only if both tables have the same structure. You need to make this happen, or I'm afraid you're going to have to assign the fields individually.
HTH0 -
You might want to try TRANSFERFIELDS. It can be used between two different records. The on-line help gives a good description of the functionality and use.Zarryn0
-
TRANSFERFIELDS only works for the fields in the source table that also exist in the target database, and with the same numbers.0
-
Hi,
I think that TRANSFERFIELDS is the command you are looking for.
Check out the help for more info.This isn't a signature, I type this at the bottom of every message0 -
hi all,
Thanks TRANSFERFIELDS is the solution.
Regards guys.Waiting for Dynamics Nav V5
France0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions