如何通过C#中的Suitetalk在netsuite中创建自定义记录?
答案 0 :(得分:2)
CustomRecord rec = new CustomRecord();
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);