R2: Webservice PageFunction ReadByRecId problems

JanGD
Member Posts: 12
Hello!
A happy new Year to all of you.
I am currently working out on a MVC project with NAV Webservices as Datasource.
I stumbled across the new function "ReadByRecId".
I tried using it with a Customer Webservice, but it always returns a null value.
i tried this
But i always get a null on the cust variable of type Customer.
Using the Filters to get the record works neither. It seems to be related to the id.ToUpper() call, but why? I use a String of 10000 passing with this call. Why isn't it working?
Thanks in advance for your help!
Cheers,
~jan
A happy new Year to all of you.
I am currently working out on a MVC project with NAV Webservices as Datasource.
I stumbled across the new function "ReadByRecId".
I tried using it with a Customer Webservice, but it always returns a null value.
i tried this
public ActionResult Details(String id) { service = new Customer_Service(); service.UseDefaultCredentials = true; cust = service.ReadByRecId(id.ToUpper()); //prevent lowercase on codefield var c = new NavCustomer(ref cust); return View(c); }
But i always get a null on the cust variable of type Customer.
Using the Filters to get the record works neither. It seems to be related to the id.ToUpper() call, but why? I use a String of 10000 passing with this call. Why isn't it working?
Thanks in advance for your help!
Cheers,
~jan
0
Comments
-
Hi,
you looked into the What new paper and found "Entity ReadByRecId(string formattedRecId)". I don't know what value for "formattedRecId" is expected but maybe you can to a test and try the other new function "string GetRecIdFromKey(string key)" and look what will be returned for the key.
Just a suggestion.
Regards,
Egnaz0 -
The format is: "<Table>: <Key field value1,Key field value 2,...>"
So for customer this would be:
"Customer: CUST1"Dean McCrae - Senior Software Developer, NAV Server & Tools
This posting is provided "AS IS" with no warranties, and confers no rights.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