problem adding field from second table to a form

tzikitzake
Member Posts: 13
I try to add fields from "Ledger Entry Dimension" to a form based on "Job Ledger Entry" by this code on the OnAfterGetRecord() of the form (t355 var. points to "Ledger Entry Dimension":
t355.reset;
t355.setrange(t355."Table ID",169);
t355.setrange(t355."Entry No.","Entry No.");
t355.setrange(t355."Dimension Code",'ACTIVIDAD');
IF t355.FIND('-') THEN;
then I added the t355."Dimension Value Code" field to the form, but when I run the form, this field is empty. What is wrong with that?
thanks.
t355.reset;
t355.setrange(t355."Table ID",169);
t355.setrange(t355."Entry No.","Entry No.");
t355.setrange(t355."Dimension Code",'ACTIVIDAD');
IF t355.FIND('-') THEN;
then I added the t355."Dimension Value Code" field to the form, but when I run the form, this field is empty. What is wrong with that?
thanks.
0
Comments
-
I tried with the below code in Form-OnAfterGetRecord trigger and working fine
CLEAR(t355); t355.RESET; t355.SETRANGE(t355."Table ID",169); t355.SETRANGE(t355."Entry No.","Entry No."); t355.SETRANGE(t355."Dimension Code",'AREA'); IF t355.FIND('-') THEN;
0 -
tzikitzake wrote:I try to add fields from "Ledger Entry Dimension" to a form based on "Job Ledger Entry" by this code on the OnAfterGetRecord() of the form (t355 var. points to "Ledger Entry Dimension":
t355.reset;
t355.setrange(t355."Table ID",169);
t355.setrange(t355."Entry No.","Entry No.");
t355.setrange(t355."Dimension Code",'ACTIVIDAD');
IF t355.FIND('-') THEN;
then I added the t355."Dimension Value Code" field to the form, but when I run the form, this field is empty. What is wrong with that?
thanks.
Check the trigger and the variables once again...--
Regards,
Raveendran.BS0 -
mohana_cse06 wrote:I tried with the below code in Form-OnAfterGetRecord trigger and working fine
CLEAR(t355); t355.RESET; t355.SETRANGE(t355."Table ID",169); t355.SETRANGE(t355."Entry No.","Entry No."); t355.SETRANGE(t355."Dimension Code",'AREA'); IF t355.FIND('-') THEN;
I have tried adding "clear(t355);" like you, but still have the same problem.
when I add the field to the form, I just fill the "SourceExpr" with t355."Dimension Value Code". Do you change anything else on the field or anywhere else?
thanks0 -
No..i didnt modify anything else except adding source expr t355."Dimension Value Code"
BTW, which version you are using?
Are you sure you have data with your filter? :-k0 -
sorry,
problem solved it was as expected a stupid problem: 'ACTIVIDADES" instead of 'ACTIVIDAD'
Thanks0
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