I've exposed Page 36 and am using OData to create assembly BOM's.
When I execute the SaveChanges below, I get a crazy error about the item not existing..?? Weird thing is, I first ran this code it ran fine but when I checked the Assembly BOM in NAV there was an empty line in the BOM. I deleted all the lines in the BOM in NAV and re-ran the code at which time this error started happening.
The error now occurs when I try to add an Assembly BOM to any item. Can anyone shed any light on this problem, additional troubleshooting methods, or services I can restart? I did restart the NAV Server for the instance I'm working with but that had no effect on the error.
LocalNAV2017.NAV theNav = new LocalNAV2017.NAV(new Uri(serviceUri)); theNav.Credentials = CredentialCache.DefaultNetworkCredentials; int lineNo = 10000; AssemblyBOM newBom = AssemblyBOM.CreateAssemblyBOM("1000", lineNo); newBom.Type = "Item"; newBom.No = "1100"; newBom.Quantity_per = 1M; newBom.Unit_of_Measure_Code = "PCS"; newBom.Assembly_BOM = false; theNav.AddToAssemblyBOM(newBom); theNav.SaveChanges();
Here's the Error:
<?xml version=\"1.0\" encoding=\"utf-8\"?><m:error xmlns:m=\"schemas.microsoft.com/.../metadata\"><m:code /><m:message xml:lang=\"en-US\">The Item does not exist. Identification fields and values: No.=''</m:message></m:error>
*This post is locked for comments
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156