new field-Help

navfresher
Member Posts: 44
I have 2 fields(F1,F2) in a table where they contain some values.Now i have created a new field(F3) in which i want to store the value of F1-F2.
I have written a code for the on the on validate function of the new field.But the value is not updating.What can be the reason?
The acutal code is this :
GLBE = G/L budget entry
GLBE.SETRANGE(GLBE."G/L Account No.","G/L Account No.");
GLBE.SETRANGE(GLBE."Global Dimension 1 Code","Global Dimension 1 Code");
IF GLBE.FINDFIRST THEN
GLBE.F3:= GLBE.F1-GLBE.F2;
Any help?
I have written a code for the on the on validate function of the new field.But the value is not updating.What can be the reason?
The acutal code is this :
GLBE = G/L budget entry
GLBE.SETRANGE(GLBE."G/L Account No.","G/L Account No.");
GLBE.SETRANGE(GLBE."Global Dimension 1 Code","Global Dimension 1 Code");
IF GLBE.FINDFIRST THEN
GLBE.F3:= GLBE.F1-GLBE.F2;
Any help?
0
Comments
-
Dear Concern
Dont write this code on OnValidate trigger of new field write this code on Onvalidate date trigger of field F2Vikram Dabas
Navision Technical Consultant0 -
vikram7_dabas wrote:Dear Concern
Dont write this code on OnValidate trigger of new field write this code on Onvalidate date trigger of field F2
Thank you for your time..but still the problem exists0 -
Dear Concern
When u want to enter the value of F1-F2 in F3?Vikram Dabas
Navision Technical Consultant0 -
vikram7_dabas wrote:Dear Concern
When u want to enter the value of F1-F2 in F3?
There are 2 cases...
1)when ever F2 field is effected.It effects when ever i post a purchase order
2)When ever i create a new budget line in the budget form
Note: F2 is a flow field.Is it of any problem?0 -
navfresher wrote:vikram7_dabas wrote:Dear Concern
When u want to enter the value of F1-F2 in F3?
There are 2 cases...
1)when ever F2 field is effected.It effects when ever i post a purchase order
2)When ever i create a new budget line in the budget form
In Case 1:
Whenever ur F2 field is effected while Postion PO, just below it(means in next line) write ur above code.
Case 2:
u means in Dimension Buffer table.If not then plz specify the Form ID.Then I can help u or determine the source table where u r entering Budget line and then enter ur above code on its OnInsert trigger.Vikram Dabas
Navision Technical Consultant0 -
vikram7_dabas wrote:navfresher wrote:vikram7_dabas wrote:Dear Concern
When u want to enter the value of F1-F2 in F3?
There are 2 cases...
1)when ever F2 field is effected.It effects when ever i post a purchase order
2)When ever i create a new budget line in the budget form
In Case 1:
Whenever ur F2 field is effected while Postion PO, just below it(means in next line) write ur above code.
Case 2:
u means in Dimension Buffer table.If not then plz specify the Form ID.Then I can help u or determine the source table where u r entering Budget line and then enter ur above code on its OnInsert trigger.
Case 1:
I am fetching the value by making it a flow field.So where actually i should write the code?
Case 2:
Form 120 and Table is 960 -
Case I:
Write code in codeunit 90 by using Calc Function (used to calculate Flow Field).
Case II:
Write code on Onsert trigger of Table 96.Vikram Dabas
Navision Technical Consultant0 -
See my post on the same here: http://dynamicsuser.net/forums/t/30498.aspx
[why post on both forums? You keep double number of people busy ...)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