Adding Dimension Values To An Item Journal Line

Jonathan2708
Member Posts: 552
Hi,
I'm trying to write some code that will automatically populate item journal line dimensions when the user keys values in a particular field in the Item Journal screen. The dimensions in question are both global and non-global dimensions so need to be added directly to the 'Journal Line Dimension' table. However I'm getting various error messages which I think are mainly centred around the fact that the journal line does not get it's "Line No." populated until a certain number of fields have been populated. Without knowing the new "Line No." I cannot add the Journal Line Dimension record.
Has anybody written this functionality (or similar) before?
Any help appreciated,
Jonathan
I'm trying to write some code that will automatically populate item journal line dimensions when the user keys values in a particular field in the Item Journal screen. The dimensions in question are both global and non-global dimensions so need to be added directly to the 'Journal Line Dimension' table. However I'm getting various error messages which I think are mainly centred around the fact that the journal line does not get it's "Line No." populated until a certain number of fields have been populated. Without knowing the new "Line No." I cannot add the Journal Line Dimension record.
Has anybody written this functionality (or similar) before?
Any help appreciated,
Jonathan
0
Comments
-
I have done this efore, but not had any problems. I don;t see why you have problem calculating th line no.
its just Line no. += 10000;David Singleton0 -
Actually just re-reading I see the issue is with the journal line number, not the dimension line.
So just look at the sales order sub form and the code on the "No." field to see how this is solved.David Singleton0 -
Hi,
Thanks for the reply. Yes it's the fact that the "Line No." on the journal line remains 0 that's causing me the problems. I'll take a look at the sales subform for inspiration.
Jonathan0 -
Jonathan2708 wrote:Hi,
Thanks for the reply. Yes it's the fact that the "Line No." on the journal line remains 0 that's causing me the problems. I'll take a look at the sales subform for inspiration.
Jonathan
just that its better to show you where the fish are biting than to throw you a fishDavid Singleton0
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