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
get custom list issue
I'm trying to get the contents of a custom list, and found another thread that offered C# code to do just that, which I used to write the code below: (original post and code) https://usergroup.netsuite.com/users/showpost.php?p=94414&postcount=8
my code:
protected void getNetSuiteList(string listId, out string statusDetail) { statusDetail = ""; if (NetSuite.misc.Login()) { RecordRef recRef = new RecordRef(); recRef.internalId = listId; recRef.type = RecordType.customList; recRef.typeSpecified = true; ReadResponse response = NetSuite.misc._service.get(recRef); if (response.status.isSuccess) { CustomList list = (CustomList)response.record; foreach (CustomListCustomValue listValue in list.customValueList.customValue) { Response.Write(listValue.valueId.ToString() + "=" + listValue.value); } } else { statusDetail = response.status.statusDetail[0].message; Response.Write(statusDetail); } } } 0