Relatively new to NAV 2015, I’ve created a SharePoint Portal that connects to NAV via webservices. The below snippet is my current connection method to NAV which works well.
The dedicated NAV login account details are stored in a SharePoint List, this works fine , my question is around the approach, as I’m lead to believe using a dedicated User account is not allowed for internal users due to Multiplexing (believe it’s called).
Is there another way to connect i.e. passing a username & there web service access key?
// Calls Function from The CoreFunctions Class File to get the login details & stuff in an array
ArrayList Details = CF.NAVLoginDetails();
// The Web Service URL – Stored in SharePoint
string serviceUri = CF.NAVWebServiceURL();
//Setting up NAV Conection
DataServiceContext context = new DataServiceContext(new Uri(serviceUri));
NAV nav2 = new NAV(new Uri(serviceUri));
// Setting NAV Credentials (Username,Password,Domain
nav2.Credentials = new System.Net.NetworkCredential(Details.ToString(), Details.ToString(), Details.ToString());
Invoices = from c in nav.TPostedSalesOrder
orderby c.Line_No ascending
foreach (CustomerPortal.ServiceReference1.TPostedSalesOrder Invoice in Invoices)
// Do XYZ