Options

Problems copying one record to another table

jCarterjCarter Member Posts: 3
edited 2001-01-11 in Navision Financials
greetings and thanks for looking....

what i am trying to do is populate a new table(newTable) based upon a filter put on another table(masterTable)...heres my code

masterTable.setRange(parentFlag, true);
IF masterTable.FIND('-') THEN
REPEAT
newTable.COPY(masterTable);
UNTIL masterTable.NEXT = 0;

when i run this i get the following error:
"Copying all filters at once can only be done between records belonging to the same table."
"Table: newTable<--masterTable"
"Copy the necessary filters one at a time"

i have tried to use COPYFILTER and COPYFILTERS to get rid of this error but to this time have had no luck...can anyone help me with what could possibly be going on...i am clueless since the help file on COPY states the following:

COPY: Use this function to copy a record from a C/SIDE table. All filters, marks, and keys are included in the copy.

SYNTAX: Record.COPY(FromRecord)
Record Data type: record
The record where the copy should be placed.

FromRecord Data type: record
The record you want to make a copy of.

Comments

Sign In or Register to comment.