Calculation problem in Customized Tables

ssingla
Member Posts: 2,973
The situation
Table 1 : Form 1 : Field 1 Field 2 Field 3 Field 4
Table 2 : Form 2 : Field 1 Field 2 Field 3
Relation :a) Field 1 of Both Table are same and linked.
b) Field 3 of of Table 1 is flow field of Field 3 of Table 2
User enters Field 2 on Form 1 and then goes to Form 2 and enter values in Field 2 & 3. More than one lines are created there. The link of Form 2 is on Form 1 and on exit of Form 2, Form 1 regain the focus.
Requirement : Calculation of Field 4 which is Field 2 * Field 3
Where to write the code to calculate the values. ](*,)
Table 1 : Form 1 : Field 1 Field 2 Field 3 Field 4
Table 2 : Form 2 : Field 1 Field 2 Field 3
Relation :a) Field 1 of Both Table are same and linked.
b) Field 3 of of Table 1 is flow field of Field 3 of Table 2
User enters Field 2 on Form 1 and then goes to Form 2 and enter values in Field 2 & 3. More than one lines are created there. The link of Form 2 is on Form 1 and on exit of Form 2, Form 1 regain the focus.
Requirement : Calculation of Field 4 which is Field 2 * Field 3
Where to write the code to calculate the values. ](*,)
CA Sandeep Singla
http://ssdynamics.co.in
http://ssdynamics.co.in
0
Comments
-
I think I would write the code on the validate of field 3 table 2. It should update field 4 of table 1.
Also, add the same code to field 2 of table 1 in case field 2 is modified after table 2.
Possibly you would want to put the code in the on delete / on modify triggers of table 2 as well...
Or instead of using a table field you could just calculate the value on the form directly... on the on after get record trigger (I think) and use a temp var to display it...TecSA Malaysia
Those of you who think you know everything are annoying to those of us who do. -
David Brent0
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