When a record variable from another table is used in the onvalidate trigger, the record will be one from the company which is open. Tricky or the meaning ??
While copying several tables one after another Nav displayed an error saying that RECORDREF had to be closed before it could be used again. After spending a little time stepping through the code I added the three closes shown in the code below to the copydata function to the Copy Company Managemente CU. After this there were no problems.
END ELSE BEGIN
NumOfRecsSkipped := NumOfRecsSkipped + GetNumOfRecs(Template."From Company",Table."Table No.");
Window.UPDATE(6,NumOfRecsSkipped);
END;
FromTable.CLOSE;
ToTable.CLOSE;
ToTable2.CLOSE;
UNTIL Table.NEXT = 0;
MESSAGE(Text005,Template."From Company",Template."To Company",NumOfRecsCreated,NumOfRecsModified,NumOfRecsSkipped);
Comments
This is a Navision thingy.
You can use company copy from every company in your database. I recommend running CompanyCopy in the company you are coping to.
Thx for your feedback!
Whenever I copy the data by choosing some specific fields, other fields of data I didn't choose will be lost.
Can I keep the original value if I didn't select the field to copy
:-k
While copying several tables one after another Nav displayed an error saying that RECORDREF had to be closed before it could be used again. After spending a little time stepping through the code I added the three closes shown in the code below to the copydata function to the Copy Company Managemente CU. After this there were no problems.
Thanks for you help,
Kim
It generates a SQL script in which you can always put some where-statements.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!