Hello everybody!
COPYFILTER copy but blanket all the filters from a table to another so I have to copyfilter field by field and not FILTER ON field that I Know that I have filter already set, so I think to get field name from virtual table field
and copyfilter.
How can I use the field fieldName for do this?
I try like below but the system return an error!
RecField.SETRANGE(TableNo, 37);
IF RecField.FIND('-')
THEN
REPEAT
IF RecField.FieldName <> "Sales Line".FIELDNAME("Sell-to Customer No.")
THEN
IF "Sales Line".GETFILTER(RecField.FieldName) <> ''
THEN
"Sales Line".COPYFILTER(RecField.FieldName, SalesLine2.FIELDNAME(RecField.FieldName));
UNTIL RecField.NEXT = 0;
Thanks in Advance
Bye
0
Comments
If not, you have to convert the records to a recordreference and then copy the filters 1 by 1. Between the ( and the ) must be the field itself. Not a variable with in it the name of the field.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I Hope in that solution but i presuppose that don't work!
Thanks
Best Regards
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.