COPY method and TRANSFERFIELDS method

MRQ
Member Posts: 73
hi
what is the the different between COPY method and TRANSFERFIELDS method
i know that TRANSFERFIELDS copies fields based on the Field No. property of the fields. For each field in Record (the destination), the contents of the field with the same Field No. in FromRecord (the source) will be copied, if such a field exists.
but i wont to know in which cases i use COPY and in which cases i use TRANSFERFIELDS ????
thank u
what is the the different between COPY method and TRANSFERFIELDS method
i know that TRANSFERFIELDS copies fields based on the Field No. property of the fields. For each field in Record (the destination), the contents of the field with the same Field No. in FromRecord (the source) will be copied, if such a field exists.
but i wont to know in which cases i use COPY and in which cases i use TRANSFERFIELDS ????
thank u
0
Comments
-
TransferFields work with different tables.0
-
MRQ wrote:but i wont to know in which cases i use COPY and in which cases i use TRANSFERFIELDS ????0
-
COPY only works if both record type variables are based on the same table. TRANSFERFIELDS will transfer field values from one type of record variable to another (but, as you said, only the ones with corresponding field numbers).0
-
I create temporary table (TT).
I have real table of the same subtype (RT)TT.COPY(RT) MESSAGE:= FORMAT(TT.COUNT)+' , ' + FORMAT(RT.COUNT);
And I recive the message "0 , 269"
Why COPY don't work?0 -
randrews wrote:I create temporary table (TT).
I have real table of the same subtype (RT)TT.COPY(RT) MESSAGE:= FORMAT(TT.COUNT)+' , ' + FORMAT(RT.COUNT);
And I recive the message "0 , 269"
Why COPY don't work?
PLEASE read the manual
Copy command does not copy the table (contents) it copies record variable (and record variable is also not a record itself)0 -
randrews wrote:I create temporary table (TT).
I have real table of the same subtype (RT)TT.COPY(RT) MESSAGE:= FORMAT(TT.COUNT)+' , ' + FORMAT(RT.COUNT);
And I recive the message "0 , 269"
Why COPY don't work?
hi randrews,
"copy" only copies the contents of one record to the other.
copying the contents of a table to a tempory table has to be done with the use of a loop likeif rt.find('-') then repeat tt.copy(rt); tt.insert; until rt.next = 0;
0 -
COPY
This copies the records data plus all filters, marks etc.
TRANSFERFIELDS
Transfer field values for different tables based on their fieldnumber
Assigning ItemRec2 := ItemRec
Copies only field values (same record variable)
Fastest when copying values from one record variable to another is the assignment method.
\:D/0 -
Urmas
I read manual !
Help (CSIDE reference):COPY (Record) Use this function to copy a record from a C/SIDE table
Nothing about temporary tables.
To tell the truth I don't need this function (in a half year of using C/AL).
I copy through REPEAT, UNTIL in temporary table.
I saw this topic, and deside try this method (with reading help).0
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
- 321 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