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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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