Jared Fraley
02/04/2025, 4:02 PMCeligo AI
02/04/2025, 4:02 PMAI generated answer (using internal Slack threads):To hide or disable the "Default" checkbox when adding a payment instrument, you can use a client script or a User Event script in NetSuite's SuiteScript. Unfortunately, the threads do not provide a specific code sample for this, but the general idea would be to use the
fieldChanged
or beforeLoad
event to target the specific field and set its display type to hidden or disabled.
Here is a general idea of how the script might look:
javascript
function beforeLoad(context) {
if (context.type !== context.UserEventType.CREATE)
return;
var form = context.form;
var field = form.getField({
id: 'custbody_default_payment_instrument' // replace with the actual field id
});
if (field) {
field.updateDisplayType({
displayType: 'hidden' // or 'disabled'
});
}
}
Remember to replace 'custbody_default_payment_instrument'
with the actual ID of your "Default" checkbox field. This script will hide or disable the field when creating a new record.
Please note that this is a general approach and might need to be adjusted based on your specific requirements and NetSuite setup. Always test scripts in a sandbox environment before deploying to production.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/04/2025, 4:02 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829191566
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821968377
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81453377
Celigo AI
02/04/2025, 4:02 PM