Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Obtain Invoice Internal ID
I am doing something wrong here but IA m not sure what. I cannot seem to obtain the internal ID of an invoice using the external ID.
Here is my code (its not the best, its just a temp project)
private static String GetInvid(com.netsuite.webservices.NetSuiteService service, string externalID) { com.netsuite.webservices.RecordRef recordRef = new com.netsuite.webservices.RecordRef(); recordRef.externalId = externalID; recordRef.type = ConsoleApplication2.com.netsuite.webservices.RecordType.invoice; recordRef.typeSpecified = true; com.netsuite.webservices.ReadResponse response = service.get(recordRef); Console.WriteLine("Looking for externalID: -{0}-", externalID); if (!response.status.isSuccess) { System.Console.WriteLine("ERROR: {0}", response.status.statusDetail[0].message); return response.status.statusDetail[0].message; } else { com.netsuite.webservices.Invoice invgot = (com.netsuite.webservices.Invoice)response.record; System.Console.WriteLine("Found Invoice internal ID of: {0}", invgot.internalId); return invgot.internalId; } } 0