Discussions
Notice about a Suitelet Regression
Hi All,
I thought I should post this here in case it affects anyone else.
I often provide information to client scripts via Inline HTML fields using the fetch API.
In 2017.1 NetSuite seemed to advise using lowercase http header names:
context.response.setHeader({
name:'content-type', // since 2025.2 needs 'Content-Type'
value:'application/json'
});
which used to result in response to the client that had Content-Type 'application/json'
Since 2025.2 the response when setting the header the lowercase version has content-type "text/plain; charset=utf-8". Changing the suitelet script to use 'Content-Type' as the header name restores 'application/json' to the client.
I've seen this on at least two accounts. I've posted a ticket to NetSuite but we are still doing the 'steps to reproduce' dance so I thought I should post this here as a potential warning/aid to others.