OnFind Trigger
Angelo
Member Posts: 180
OnFindRecord trigger I alway see this codes :
IF FIND(Which) THEN
EXIT(TRUE)
ELSE BEGIN
SETRANGE("No.");
EXIT(FIND(Which));
END;
What is the meaning of codes above?I dont understand. what value of Which?Anyone can help me to explain it in detail?
IF FIND(Which) THEN
EXIT(TRUE)
ELSE BEGIN
SETRANGE("No.");
EXIT(FIND(Which));
END;
What is the meaning of codes above?I dont understand. what value of Which?Anyone can help me to explain it in detail?
0
Comments
-
This code means:
Find(which) tries to get the record defined by "which" ( '-' first record, '+' last record, '>' next record ...)
If a record was found, the function returns with true, while the record pointer has moved to the found record.
If no record was found, the filter set on the field "No." is cleared. (setrange without limits).
Then it tries to find again the 'which'. Finally the result of the find command ist returned (true if found, false if not found)
Be aware that in this case only filters on "No." are cleared. Any other filters will remain and are not affected.
=D>0 -
Chris,Thanks for your explanation....
I have a problem pertain OnFind trigger
When I press F5 ( looking List table ) there is Document No(e.g PR001) on the list form but after I click OK then error : "PR001 does not exist in the table Header". It is very Odd. On list form and on table Exist but When I look at my form will show error for the document no. Anyone hav ever got same problem with me? Anyone can help me?
](*,) ](*,) ](*,)0 -
I have debugged it, and I have found the problem is :
In my Table Line (subform) has field type flowfield sum quantity from Transfer line field quantity. if in Transfer line with doc no (PR001) hav been posted,It will show error like my email before. maybe I have to delete doc no(PR001) in my new table after posting Transfer header with the doc no(PR001). Any suggestion? is there other way without delete doc no in my new table although Transfer header has been posted? :roll:0 -
I acknowledge to Waldo, for doing some debugging.
It's not very likely that your problem is the shown find routine, but anything else (or may be you need to do clear more or all filters with reset when nothing was found).
Check out with the debugger whats happening and what filters are set when the problem occurs.
:-k0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
