Changing the type of a field already not empty
poppins
Member Posts: 647
Hi everyone,
I have a field field1and I want to change its type from Option to Code.The problem is that the field already contains data.
I added a field field2 with type Code un the table
I created a codeunit that dooes the following:
- Copy values from field1 to field2
- Empty field1
- Change type of field1 to Code
- Copy values from field2 to field1
- Empty field2
- Delete field2
but it looks like a lot of steps to me.
Isn't there a more optimized way to do it?
Thanks in advance
I have a field field1and I want to change its type from Option to Code.The problem is that the field already contains data.
I added a field field2 with type Code un the table
I created a codeunit that dooes the following:
- Copy values from field1 to field2
- Empty field1
- Change type of field1 to Code
- Copy values from field2 to field1
- Empty field2
- Delete field2
but it looks like a lot of steps to me.
Isn't there a more optimized way to do it?
Thanks in advance
0
Answers
-
Hi,
don't know an easier way, though I would prefer to copy to field2 and delete field1.
good luck.\\The truth exists in seven versions.0 -
which version are you using?
if you are using latest NAV2016 version then you can write a upgrade codeunit which copies data to temp table and you can run upgrade codeunit again to perform data back to field 1. search for it.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

