BLOB fields copy

tthei3tthei3 Member Posts: 6
edited 2009-10-06 in NAV Tips & Tricks
Hello
I am trying to create a lot of user menus. These as you know are records in "User menu Level" table. I have in my mind to create a dataport that imports The new user name and the old user name. After importing it will create records in "User menu Level" with ID The new username and everything else the same as the old username. But only for records with level "User Restrictions". The records are created but the "Object" field is not copied. It is left blank. To be able to copy it I use the following code:
IF UserMenuLevel.Object.HASVALUE THEN
UserMenuLevel.CALCFIELDS(Object);
UserMenuLevel2.TRANSFERFIELDS(UserMenuLevel,FALSE);
UserMenuLevel2.INSERT(TRUE);

UserMenuLevel is the records to read and UserMenuLevel2 the records to write. The TRANSFERFIELDS transfers the non key records BUT it leaves the "Object" blank. Why? I did run CALCFIELDS. What else is missing?
Best regards
Akis

Comments

Sign In or Register to comment.