Unable to update current datetime

anilkumar
Member Posts: 136
Hello Nav Experts!
I am unable to update current datetime in a filed in Item table.
I have created new field "Last modifed date time" in Item Table. If any changes or created any record in sales price table the new field should update current date time.
Manually In Retail Item card if I changed sales price related filed it is updating the current date time, but while import data through Mapping (Form 8601 standard) it is not updating the current datetime.
My code as follows:
Item.GET("Item No.");
Item."Last DateTime Modified" := CURRENTDATETIME;
Item.MODIFY;
Can any Expert suggest how to solve this problem ??
I am unable to update current datetime in a filed in Item table.
I have created new field "Last modifed date time" in Item Table. If any changes or created any record in sales price table the new field should update current date time.
Manually In Retail Item card if I changed sales price related filed it is updating the current date time, but while import data through Mapping (Form 8601 standard) it is not updating the current datetime.
My code as follows:
Item.GET("Item No.");
Item."Last DateTime Modified" := CURRENTDATETIME;
Item.MODIFY;
Can any Expert suggest how to solve this problem ??
Anil Kumar Korada
Technical Consultant
Technical Consultant
0
Comments
-
-
Hi Kine,
Thanks for quick response!
Code is place in on Modify of Sales Price table.Anil Kumar Korada
Technical Consultant0 -
Imports through the Mapping form is not calling the OnModify trigger when modifying the record. It is why it is not working... ;-)0
-
Hi Kamil,
Thanks a lot!
If I want to validate in Sales Price table or Item table then where I should write code??
If that field totally blank then I can able to update the field with current datetime through Mapping form.
But I am unable to blank that field, If any value is existing, I hv already tried with 0DT, but not working??Anil Kumar Korada
Technical Consultant0 -
Add some new option into the header of the mapping, find the code, where the records are inserted and add condition, that if the new field in header is set, than modify/insert the records with calling the triggers... ;-)
Take it as small exercise... it is not hard... ;-)0 -
Thanks for Quick Response!
But existing Mapping functiionlaity should not be distrib for this customization, Have to do what ever customization in Item or Sales Price table. Can you plese help me where to write the code??Anil Kumar Korada
Technical Consultant0 -
You cannot "solve" this through modification of those tables (or if yes, than in complicated way). Modification of the Mapping functionality when done correctly is only question of one new field and one or two lines in the standard code. But it is on you. If you need another way, it is your choice...0
-
Hi Kamil,
Thanks for excellect support!
I will try for complicated way. Thanks for made the problem more clear.Anil Kumar Korada
Technical Consultant0
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