Information on COPY function
Nitesh
Member Posts: 43
I want more information on how to use COPY function and its use.I have tried it out but didnt get desired result.
0
Comments
-
You could search for COPY in the C/SIDE reference guide (Design mode: F1)
You'll find a copy for records and a copy for files.
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
i had seen that. It doesnt work atall.0
-
im trying something like this,
Table1.COPY(Table2);
copying records from table2 to table1 and its giving me error like,
'Copying all filters at once can only be done between records belonging to the same table. Copy the necessary filters one at a time.'0 -
Nitesh wrote:im trying something like this,
Table1.COPY(Table2);
copying records from table2 to table1 and its giving me error like,
'Copying all filters at once can only be done between records belonging to the same table. Copy the necessary filters one at a time.'
The reason is, that copy is copying the filters too and they do not match, obviously you are trying to copy from one table to another, e.g. 18 to 21, that's not possible. The records have to be from the same source table.
If fieldnumbers are the same, you can use transferfields to copy identical fields from one record to another. If the tables are totally different, you have to assign every field manually.Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
If the tables are totally different, you have to assign every field manually.
i didnt get how it can b done..but anyways thank you..0 -
Nitesh wrote:If the tables are totally different, you have to assign every field manually.
i didnt get how it can b done..but anyways thank you..
Maybe I got you wrong.
with "manually" I meant a normal assignment to the record fields, e.g.SalesLine.... SalesLine.Description := Item.Description; SalesLine."No." := Item."No."; SalesLine.insert;
etc.Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
you can try like this
table1 - record data type
table2 - record data typeif table2.find('-') then repeat table1.transferfields(table2); table1.insert; until table2.next = 0;
provided, your table2's field numbers should match with your table1's field numbers and their data type should also matchRegards,
Sharon0 -
"COPY (Record)
Use this function to copy a record from a C/SIDE table. All filters, marks, and keys are included in the copy.
Record.COPY(FromRecord)"
The COPY function copy all the filters from table2 to table1 .So If the tables or table fields are not same then COPY are not working .If u want to assign two differnt field value then if the field IDs and data type both tables are same then use TRANSFERFIELD function .otherwise assign manualy all field from table2 to table1 .0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 324 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
