Master Template - data from more tables

bstoyano
Member Posts: 134
hi guys,
I am creating master templates for Items. I would like to set default values for fields in another table as well, not only in Item table. E.g. I want to set posting groups for the Item, but also an Item unit of measure. Is it possible to do it with one template?
I see that in the lines of the template there is a field Type, which can be either Field or Template. When I choose Type = Field everything works fine - I can select a field name. But if I choose Type = Template, then I cannot select anything in field Field Name. How do I use the Type = Template feature?
I am creating master templates for Items. I would like to set default values for fields in another table as well, not only in Item table. E.g. I want to set posting groups for the Item, but also an Item unit of measure. Is it possible to do it with one template?
I see that in the lines of the template there is a field Type, which can be either Field or Template. When I choose Type = Field everything works fine - I can select a field name. But if I choose Type = Template, then I cannot select anything in field Field Name. How do I use the Type = Template feature?
Boris
*
Please, do not frighten the ostrich,
the floor is concrete.
*
Please, do not frighten the ostrich,
the floor is concrete.
0
Comments
-
For us we can set the default for ItemUOM field but it doesn't create it in the ItemUOMtable.
For that I added some code to the item table Oninsert trigger.
I created a function called AutoFillUnitOfMeasure where I call it from the onInsert trigger.
Hardcoding is not the way to go but in this case the BaseUOM will ALWAYS be 1 for us.OnInsert() //Autofill unit of measure to default AutoFillUnitOfMeasure; Function:AutoFillUnitOfMeasure() IF ItemUnitOfMeasure.GET("No.","Base Unit of Measure") THEN BEGIN VALIDATE("Base Unit of Measure"); END ELSE BEGIN ItemUnitOfMeasure.Code := "Base Unit of Measure"; ItemUnitOfMeasure."Item No." := "No."; ItemUnitOfMeasure."Qty. per Unit of Measure" := 1; ItemUnitOfMeasure.INSERT(TRUE); VALIDATE("Base Unit of Measure"); END;
0 -
Thanks Savatage. But is it possible somehow to do it without adding code?
What I am doing now is migrating a client from Nav 4 to Nav 5 and I try to avoid customisations if possible. In NAV 4 we have done a customisation for this too, but in NAV 5 we have this function Apply Template for Items and I wanted to make use of it.Boris
*
Please, do not frighten the ostrich,
the floor is concrete.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