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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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