BLOB fields copy

tthei3
Member Posts: 6
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
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
0
Comments
-
You need to export it into file/stream and import it back into new record. Look at COPYSTREAM function...0
-
I remember seeing something similar... Haven't used it to see what it does exactly
You may give it a try...
http://www.mibuso.com/dlinfo.asp?FileID=5120 -
Thank you, it worked perfect!!!!!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
- 320 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