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.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Updating Custom Record causes FIELD_PARAM_REQD error
Hi,
I'm updating an existing CustomRecord where the object I'm providing within the code contains the following fields:
- RecType, by providing its id
- The internal id of the custom record
- Boolean custom field within the custom field list.
Unfortunately I'm getting FIELD_PARAM_REQD error response with the message: "Please enter a value for Name".
Tried to supply a name for the Rectype / CustomRecord (Although it makes no sense) but still getting the same result.
The code:
public void updateIsProcessFieldOnPaymentFile(CustomRecord originalCustomRecord) throws NetsuiteException { // Copy original unchanged properties CustomRecord updatedCustomRecord = new CustomRecord(); RecordRef recordRef = new RecordRef(); recordRef.setInternalId(originalCustomRecord.getRecType().getInternalId()); updatedCustomRecord.setRecType(recordRef); updatedCustomRecord.setInternalId(originalCustomRecord.getInternalId()); // Update the field ArrayList<CustomFieldRef> customFields = new ArrayList<CustomFieldRef>(); BooleanCustomFieldRef booleanCustomFieldRef = new BooleanCustomFieldRef(); booleanCustomFieldRef.setValue(true); booleanCustomFieldRef.setScriptId("custrecord_imperva_file_is_processed"); customFields.add(booleanCustomFieldRef); // Add field to record CustomFieldList customFieldList = new CustomFieldList(); customFieldList.setCustomField(customFields.toArray(new CustomFieldRef[customFields.size()])); updatedCustomRecord.setCustomFieldList(customFieldList); // Update netsuite WriteResponse writeResponse = null; try { writeResponse = updateRecord(updatedCustomRecord); } catch (Exception e) { LOG.error("Couldn't update NetSuite Payment File with id: " + updatedCustomRecord.getInternalId()); throw new NetsuiteException("Couldn't update NetSuite Payment File with id: " + updatedCustomRecord.getInternalId()); } if (!writeResponse.getStatus().isIsSuccess()) { StatusDetail[] 0