RE: Suitelet Bug? currentRecord.setValue()

Has anyone experienced a bug where currentRecord.setValue() does not work on clientScript of form, getting error “selectmap is not defined”

I have narrowed this down to being on SELECT fields that are added to the form on POST request method, and when they are popup style (i.e. values/text need to be queried rather than showing up in dropdown)

This appears to be because the Suitelet client script runs a GET request query to get the appropriate Label to populate in the field, but the response comes back empty (I assume since the field was added on POST, it isnt aware of the fieldId on a GET request)

Thanks

dbarnett Intermediate Asked on May 26, 2020 in SuiteCloud.

You’ll probably need to share a lot of your code, specifically the field addition and the form rendering on GET vs POST.

on May 26, 2020.

There’s no difference really, at the end of both GET & POST just have:
`response.writePage({ pageObject : form });`

I am thinking anyone should be able to replicate this, just having a Submit button on the form and then adding an additional certain field on the Form object in scenario of request.method === ‘POST’

on May 26, 2020.
Add Comment
2 Answers

I had the same issue. Make sure you’re passing the correct parameters to currentRecord.setValue(). The field ID must be in lowercase, and the value must be of the correct type for that field. In my case, using an uppercase field ID caused the error: “ReferenceError: selectmap is not defined.”

Hope this helps!

Rookie Answered on July 3, 2026.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.