Call Function on PagePart (Former SubForm)

ASK_ITG
Member Posts: 30
Hi,
I am trying to make a PagePart in my Page - but it will not make the Filter that I would like.
I have in the Classic Client som code that makes a Filter by calling a Function og the Subform - which I am trying to doublicate to my Page - but it doesn't work. :oops:
The Code:
Can anyone help me?
I am trying to make a PagePart in my Page - but it will not make the Filter that I would like.
I have in the Classic Client som code that makes a Filter by calling a Function og the Subform - which I am trying to doublicate to my Page - but it doesn't work. :oops:
The Code:
Can anyone help me?
/Allan
0
Comments
-
Hi,
The Function:
SetActSubscriber(pNo : Code[20])
ActSubscriberNo := pNo;
SETRANGE("Subscriber No.", ActSubscriberNo);
Have tried to call CurrPage.Update - got an error saying something like:
"You can not make a change to the databasen before a transaction has started"/Allan0 -
try CurrPage.UPDATE(FALSE)-Mihail- [MCTS]0
-
Hi,
No effect.
Have inserted some Messages - and I can se that the code on the function is processed - but doesn't take effect, or at least doesn't update the subpage.../Allan0 -
Try this: don't set the SETRANGE in the function you're calling from the 'headerpage', but put that line in the OnAfterGetRecord of the subpage (don't know if that trigger exists in pages, I only work with forms).
[edit]
oops, if the user wants to change this filter he won't like this :oops:
In this case a check is needed whether the filter has to be set or not, something like
SetActSubscriber(pNo : Code[20])
ActSubscriberNo := pNo;
FilterHasBeenSet := FALSE;
OnAfterGetRecord()
IF NOT FilterHasBeenSet THEN SETRANGE("Subscriber No.", ActSubscriberNo);
FilterHasBeenSet := TRUE;
[/edit]
And what about SubFormLink / SubPageLink?
Regards0 -
:P I've been searching for a solution, my page with filtered subpage, did not update the subpage. When I pressed F5 on my key-board, the sub page /subform was updated. When I pressed with the mouse: actions from the mainpage, refresh (= F5) the subform was not updated.
The solution was simple: change the pagetype from the main page to worksheet.
:-$ I should have known, made worksheets before....but the filtering was done with an action and not with a field with options in the main page. :-$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