Access to that record type from the user interface...
# ask-stanley-ai
r
Access to that record type from the user interface is not allowed
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the issue is about managing permissions on a custom record type in NetSuite. In NetSuite, you can manage permissions on a custom record type by setting the Access Type to
Use Permission List
. This allows you to grant access to certain users without giving permission to their entire role. You can do this in the Permissions subtab of the record type, where you can select the role and the corresponding Access Level. If you want to allow just record edit through the UI and not create or delete, you can use a workflow to restrict creating and deleting. You can filter this on the record type. Another solution is to use a UserEvent on the record in beforeLoad and check the context. You can then do whatever you want it to on CREATE or DELETE. If you want to show an error and stop loading the record when a user wants to delete the record, you need to use beforeSubmit and check the
context.type
. You can then use
throw
to throw an error. Here is a sample code snippet:
Copy code
javascript
function beforeSubmit(context) {
    if (context.type === context.UserEventType.DELETE) {
        throw nlapiCreateError('CUST_DELETE_ERR', 'Deleting this record is not allowed', true);
    }
}
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818983614
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815670848
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815512478
Please provide your feedback on this answer.