Page: How to GETFILTERS from Web Service

mbj
Member Posts: 63
Page:
C#:
filter[0].Criteria = "Test";
I can not read the filters from the Web Service on the triggers OnInit() or OnOpenPage()
GETFILTERS are empty
I have also tried the diffrent filtergroups 0..
C#:
filter[0].Criteria = "Test";
I can not read the filters from the Web Service on the triggers OnInit() or OnOpenPage()
GETFILTERS are empty
I have also tried the diffrent filtergroups 0..
0
Comments
-
Could you post the rest of your C# code - just to make sure that filters are applied correctly when invoking your web service methodFreddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
mbj wrote:in NAV the getfilters are empty?0
-
if getfilters()<>'' then from the triggers OnInit(), OnOpenPage() are always empty
I will use the filters to create myRec and then overwrite the current Rec on the Page with myRec. (because functions in pages not are available from C#)
*****
Other solution is to create a function i a Codeunit with parameters - but then i have to return my own xml dataset and not the smart Page?
*****
Note the filters are available from the trigger OnAfterGetRecord() (but then there need to be at least one record)0 -
note:
getfilters are used on Page 658 OnOpenPage() buy will not work from a web service - only in the Role tailed Client0 -
I guess I am just missing something, because you are making absolutely no sense at all to me. Are you implementing a web service or modifying a page, or implementing a web service on a page?0
-
You do know that you have the ability to create a function and expose this on the page by exposing a codeunit with the same name as the page and removing the checkmark in Published - right?
Maybe this is a different solution to your issue.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
freddy.dk it sounds interesting – can you give me a example?
What do you mean by removing the checkmark in Published for the Codeunit or the Page?0 -
Put the following code in a codeunit
GetBookmark(Key : Record Customer) bookmark : Text[1024] ref.GETTABLE(Key); bookmark := FORMAT(ref.RECORDID, 0, 10);
Expose this codeunit with the name Customer in the WSTable (Look image)
If you now look at the WSDL for the Customer page you will see your function exposed on that:<binding name="Customer_Binding" type="tns:Customer_Port"> <binding transport="http://schemas.xmlsoap.org/soap/http" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" /> - <operation name="Read"> - <operation name="ReadMultiple"> - <operation name="IsUpdated"> - <operation name="Create"> - <operation name="CreateMultiple"> - <operation name="Update"> - <operation name="UpdateMultiple"> - <operation name="Delete"> - <operation name="GetBookmark"> </binding>
And calling this from C# looks like:string bookmark = service.GetBookmark(customer.Key);
Hope it solves your problemFreddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
The filter problem is not solved i SP1? It is still not possible to get filters oninit and onopen triggers on pages published as webservice.0
-
I have a question regarding a similiar "issue": Is it to dynamically change the data in the response of a web service request (without physically changing the data in the table)?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