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.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
string::replace problem
I'm trying to replace the "<br>" tags in a block address with 'n'
My javascript knowledge is limited, but from what I know (and have read online) this should be as easy as replace(oldString, /<br>/, 'n');
Here is my exact code:
var shipToAddress = invoice.getFieldValue('shipaddress'); shipToAddress = shipToAddress.replace(shipToAddress, /&lt;br&gt;/, 'n'); This code throws an error:
"SyntaxError: invalid flag after regular expression (OnAfterSubmit#55)"
I've googled for this error and there aren't many useful results.
Anyone have any ideas what I could be doing wrong?
Thanks for any help,
Steve
Steve Klett | Senior Developer
NetValue Technology
0