How to update just modified fields
dn
Member Posts: 71
I am stuck with a problem. I have a table(tmpItem) who is a copy of Item-table.
TmpItem use for Itemimport before I put them into Item-table.
Now I want to update records in Item table with tmpItem-records there data had been changed in tmpItem-record.
I don't what to use Transferfields...because there is risk I overwrite data in Item. IS there any good trick for my little problem?
:-k
TmpItem use for Itemimport before I put them into Item-table.
Now I want to update records in Item table with tmpItem-records there data had been changed in tmpItem-record.
I don't what to use Transferfields...because there is risk I overwrite data in Item. IS there any good trick for my little problem?
:-k
0
Comments
-
1. Create a Report, with TmpItem as DataItem
2. Declare Item as record in Global Var
3. At the DataItem's OnAfterGetRecord trigger, do this:IF Item.GET("No.") THEN BEGIN Item.Description := TmpItem.Description Item.MODIFY; END;(this will change just the Description of Item, you can do so with the any other fields in Item table)
Rgds,
Jon.Rgds,
Jon.0 -
jonsan21 wrote:1. Create a Report, with TmpItem as DataItem
2. Declare Item as record in Global Var
3. At the DataItem's OnAfterGetRecord trigger, do this:IF Item.GET("No.") THEN BEGIN Item.Description := TmpItem.Description Item.MODIFY; END;(this will change just the Description of Item, you can do so with the any other fields in Item table)
Rgds,
Jon.
Well..if it only description-field I can use modify. But in this case there are several fields. I use dataport to import data into tmpItem then I have a form that I can correct data I imported and then update fields in Item-table..is I clear?0 -
Then you only need to use the fields which are on your form (and which users can edit):dn wrote:[...] then I have a form that I can correct data I imported and then update fields in Item-table..is I clear?IF Item.GET("No.") THEN BEGIN Item.Field1 := TmpItem.Field1; Item.Field2 := TmpItem.Field2; ... Item.MODIFY; END;No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)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
- 322 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
