Hagar Ahmed
09/11/2024, 6:34 AMCeligo AI
09/11/2024, 6:34 AMAI generated answer (using internal Slack threads):To hide the manufacturing subtab on assembly item except for administrators, you can use a combination of SuiteScript and role permissions. First, you would need to create a User Event Script that runs on the beforeLoad event. In this script, you would get the current user's role and check if it is not 'Administrator'. If it is not, you would then get the form object and the manufacturing subtab, and set its display type to hidden. Here is a sample code snippet:
javascript
function beforeLoad(context) {
var userRole = runtime.getCurrentUser().role;
if (userRole != '3') { // 3 is the internal ID for Administrator role
var form = context.form;
var subtab = form.getSubtab({id: 'manufacturing'});
subtab.updateDisplayType({displayType: serverWidget.FieldDisplayType.HIDDEN});
}
}
Second, you would need to ensure that the non-administrator roles do not have the 'View Item Entry Forms' permission. This can be done by going to Setup > Users/Roles > Manage Roles, edit the role, and under Permissions > Lists, remove the 'View Item Entry Forms' permission.
Please note that this solution assumes that the internal ID of the manufacturing subtab is 'manufacturing', and that the internal ID of the Administrator role is '3'. You would need to replace these with the actual internal IDs in your account.
******
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/11/2024, 6:35 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82393527
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820136607
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810403824
Celigo AI
09/11/2024, 6:35 AM