Sweet Talk on SuiteTalk & Custom Records
NetSuite documentation offers decent instructions on how to work with standard records via SuiteTalk. However, working with Custom Records is a bit trickier, and little documentation is available. A pretty common question from clients is, “How do I create a Custom Record with SuiteTalk?” So I thought I would include a simple C# example as this week’s post…
RecordRef recType = new RecordRef();
recType.internalId = “10”; // Internal ID of custom record type, not individual record id
recType.type = RecordType.customRecord;
recType.typeSpecified = true;
rec.recType = recType;
rec.name = “My new custom record”;
CustomFieldRef[] customFieldArray = new CustomFieldRef[1];
StringCustomFieldRef stringField = new StringCustomFieldRef();
stringField.scriptId = “custrecord_string”;
stringField.value = “A string”;
customFieldArray[0] = stringField;
rec.customFieldList = customFieldArray;
WriteResponse response = _service.add(rec);
I hope this is helpful to any one scouring the web trying to figure this out. For more information feel free to contact us at thoughtleader@keystonebusinessservices.net.