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
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