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?
0
Comments
Dont write this code on OnValidate trigger of new field write this code on Onvalidate date trigger of field F2
Navision Technical Consultant
Thank you for your time..but still the problem exists
When u want to enter the value of F1-F2 in F3?
Navision Technical Consultant
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?
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.
Navision Technical Consultant
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 96
Write code in codeunit 90 by using Calc Function (used to calculate Flow Field).
Case II:
Write code on Onsert trigger of Table 96.
Navision Technical Consultant
[why post on both forums? You keep double number of people busy ...)
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community