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
Please note that on Friday, March 20, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 4 hours. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Why is this client script not logging anything?
Hi
I have the following client script which i would expect would trigger when the vendor name or subsidiary is changed on a vendor bill record (which is where it is deployed). Can you see what is wrong with the script? This isn't returning an error though isn't logging anything with console.log (deleted) or log.debug(current version of script)
/** @NApiVersion 2.x@NScriptType ClientScript
*/
define(['N/search', 'N/record', 'N/log'], function(search, record, log) {function fieldChanged(context) {
var currentRecord = context.currentRecord; var fieldId = context.fieldId; // Logging the current record and the field ID log.debug('Current Record', JSON.stringify(currentRecord)); log.debug('Field ID', fieldId); // Trigger the search when the vendor or subsidiary field changes if (fieldId === 'entity' || fieldId === 'subsidiary') { var vendorName = currentRecord.getText('entity'); // Get vendor name var subsidiaryName = currentRecord.getText('subsidiary'); // Get subsidiary name log.debug('Vendor Name', vendorName); log.debug('Subsidiary Name', subsidiaryName); if (vendorName && subsidiaryName) { //
0