Modify an item using Item Template

patelashlesh83
Member Posts: 54
Hi,
I can create a new item using Item Template. My question is can i modify an item using Item Template?
I didnt find any option available on Item Details form. Is it possible using X++ (coding)?
Thanks in advance.
Regards,
/Ashlesh
I can create a new item using Item Template. My question is can i modify an item using Item Template?
I didnt find any option available on Item Details form. Is it possible using X++ (coding)?
Thanks in advance.
Regards,
/Ashlesh
0
Comments
-
Yes, it's possible with coding (everything is possible with coding :P ):
// APPLY TEMPLATE
RecRef.GETTABLE(Item);
TemplateMgt.UpdateRecord(DataTemplateHdr,RecRef);
Item = Record datatype, filtered to your record
TemplateMgt = Codeunit Template Management
RecRef = RecordRef datatype
Be sure you retrieve your record again after this so your ITEM record has the changes. Otherwise, any other mods that follow could wipe out what you did with your template update as your version of the ITEM record will overwrite the one modified through the codeunit.So You Want to be NAV Developer?
http://www.archerpoint.com/blog/faithie-robertson
A blog by Faithie Robertson0 -
Hi Faithie Robertson,
Your solution is for AX 2009 ?
Regards,
/Ashlesh0 -
Template to modify may not available as it need to perform several validations.
I believe, it is not really a good to have a template for modification.
Creation happens once for a record - modification can happen number of times - when to trigger the template and every time checking the validations may not appropriate...Kranthi0
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