Manage OnFindRecord Trigger of a Factbox

Troubles_In_Paradise
Member Posts: 588
Hi guys!
Working with: NAV 2009 R2
Refering to this post: viewtopic.php?f=32&t=47131
I created a simple list page and a factbox (both based on the customer table, linked via SubformLink -> "No."=Field("No.")).
In the previous post, jreynolds (last but one replay) said that, when a record in the repeater of the main page is selected, the OnFindRecord trigger of the factbox is fired. He's right!
He suggests to program this trigger in order to show what you want in the factbox, but if I insert some code in it, the factbox doesn't show anything!
the following is the code I inserted in the factbox:
Now I took a look to OnLineHelp in order to understand what this trigger does (I never used it), but I really can't get how to use it!
My question is how can I specify the record to show in this factbox (if it's possible, because I'm not sure I understood correctly the meaning of this trigger) through OnFindRecord trigger?
Thx all in advance!
Working with: NAV 2009 R2
Refering to this post: viewtopic.php?f=32&t=47131
I created a simple list page and a factbox (both based on the customer table, linked via SubformLink -> "No."=Field("No.")).
In the previous post, jreynolds (last but one replay) said that, when a record in the repeater of the main page is selected, the OnFindRecord trigger of the factbox is fired. He's right!
He suggests to program this trigger in order to show what you want in the factbox, but if I insert some code in it, the factbox doesn't show anything!
the following is the code I inserted in the factbox:
OnFindRecord(Which : Text[1024]) : Boolean FILTERGROUP(4); message(getfilter("No.")); FILTERGROUP(0);
Now I took a look to OnLineHelp in order to understand what this trigger does (I never used it), but I really can't get how to use it!
Overrides the default form behavior and enables you to specify which record you want to display when the form opens. [Ok]:= OnFindRecord(Which)
My question is how can I specify the record to show in this factbox (if it's possible, because I'm not sure I understood correctly the meaning of this trigger) through OnFindRecord trigger?
Thx all in advance!
~Rik~
It works as expected... More or Less...
It works as expected... More or Less...
0
Answers
-
Did you try with
EXIT(FIND(Which));
0 -
mohana_cse06 wrote:Did you try with
EXIT(FIND(Which));
~Rik~
It works as expected... More or Less...0 -
can we change the record shown in the factbox?
for example: if I select the record with id 1000 I would the factbox to show information of the record 2000.
is it possible?~Rik~
It works as expected... More or Less...0 -
Never tried that kind of logic
you can trySETRANGE("No.",'2000'); EXIT(FIND(Which));
0 -
mohana_cse06 wrote:Never tried that kind of logic
you can trySETRANGE("No.",'2000'); EXIT(FIND(Which));
Damn! It doesn't work.~Rik~
It works as expected... More or Less...0 -
can you show the code you tried..0
-
mohana_cse06 wrote:can you show the code you tried..
FILTERGROUP(4); IF GETFILTER("No.") = '2000' THEN BEGIN SETRANGE("No.",'1000'); EXIT(FIND(Which)); END; FILTERGROUP(0);
~Rik~
It works as expected... More or Less...0 -
is your code going inside the IF loop?
can you simply try withSETRANGE("No.",'2000'); EXIT(FIND(Which));
from other customer like 1000 or 3000..0 -
mohana_cse06 wrote:is your code going inside the IF loop?
can you simply try withSETRANGE("No.",'2000'); EXIT(FIND(Which));
from other customer like 1000 or 3000..
you're right, now works!
the last thingh I'd like to try is to change values shown in factbox if the sourceExpr of fields aren't fields of a record variable but variable like string code etc...~Rik~
It works as expected... More or Less...0 -
Stupid test but it works!
end of tests... now I try in a real project.FILTERGROUP(4); IF GETFILTER("No.") = '20000' THEN BEGIN SETRANGE("No.",'10000'); EXIT(FIND(which)); currpage.update; END; FILTERGROUP(0);
thx mohana for helping me!~Rik~
It works as expected... More or Less...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