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
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
Comments
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,
Egnaz
So for customer this would be:
"Customer: CUST1"
This posting is provided "AS IS" with no warranties, and confers no rights.