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
custom record type fields
How do you add fields to a CustomRecordType? From what I've read, you can only add fields on an update. I've added the CustomRecordType and have the ID, so I tried to do an update, but nothing's working. Here's what I'm currently trying:
public void updateCustomRecordType() { CustomRecordType li = new CustomRecordType(); li.internalId = "22"; li.recordName = "License"; li.fieldList = createLicenseFields(); WriteResponse attempt = _service.update(li); if (!attempt.status.isSuccess) { string err = "Error(s):rnrn"; foreach (StatusDetail sd in attempt.status.statusDetail) { err += sd.message + "rnrn"; } MessageBox.Show(err); } else { MessageBox.Show("It worked!"); } } public CustomRecordTypeFieldList createLicenseFields() { CustomRecordTypeFieldList fieldsList = new CustomRecordTypeFieldList(); CustomRecordCustomField liNumber = new CustomRecordCustomField(); liNumber.displayType = CustomizationDisplayType._normal; liNumber.displayTypeSpecified = true; liNumber.fieldType = CustomizationFieldType._freeFormText; liNumber.fieldTypeSpecified = true; liNumber.showInList = true; liNumber.showInListSpecified = true; liNumber.storeValue = true; liNumber.storeValueSpecified = true; liNumber.isMandatory = true; liNumber.isMandatorySpecified = true; fieldsList.customField = new CustomRecordCustomField[] { liNumber 0