Hagar Ahmed
09/16/2024, 8:00 AMCeligo AI
09/16/2024, 8:00 AMAI generated answer (using internal Slack threads):To hide the Manufacturing subtab in an item from all roles except for admins, you can use a combination of SuiteScript and role-based permissions. Here's a step-by-step guide: 1. Create a User Event Script: This script will run before the page is loaded (beforeLoad). In this script, you will access the form and get the Manufacturing sublist. Then, you will set the displayType of the sublist to hidden. Here's a sample code snippet:
javascript
function beforeLoad(context) {
if (context.type !== context.UserEventType.VIEW) return;
var userObj = runtime.getCurrentUser();
if (userObj.roleId !== 'administrator') {
var form = context.form;
var sublist = form.getSublist({id: 'manufacturing'});
sublist.updateDisplayType({displayType: serverWidget.FieldDisplayType.HIDDEN});
}
}
This script checks if the current user is not an administrator. If they are not, it hides the Manufacturing sublist.
2. Set Role-Based Permissions: In NetSuite, navigate to Setup > Users/Roles > Manage Roles. Select the role you want to modify, and in the Permissions subtab, remove the permission that allows access to the Manufacturing subtab. Repeat this for all roles except for the administrator role.
Remember, this approach requires a good understanding of SuiteScript and NetSuite's role-based permissions. If you're not comfortable with these, you might want to consider getting help from a NetSuite professional.
******
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
09/16/2024, 8:00 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818399489
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81656152
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809051037
Celigo AI
09/16/2024, 8:00 AM