Any idea why my non-Administrator users are gettin...
# ask-stanley-ai
t
Any idea why my non-Administrator users are getting unexpected errors when saving a Task in 2025.2? I’ve narrowed it down to attempting to use context.newRecord.setValue to change some values of custom fields beforeSubmit in the user event script. Same code has worked for years before 2025.2 release and it works for Administrator now just not regular users.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the issue might be related to the permissions of the non-Administrator users. In NetSuite, certain operations such as setting values of fields in a record might require specific permissions that your non-Administrator users might not have. In the 2025.2 release, NetSuite might have changed the permission requirements for certain operations. This could explain why your code is working for Administrator users but not for non-Administrator users. To resolve this issue, you could try the following steps: 1. Check the permissions of your non-Administrator users in NetSuite. Make sure they have the necessary permissions to perform the operations in your script. 2. If the non-Administrator users have the necessary permissions, try to debug your script to see if there are any issues. You can use the
log.debug
function in SuiteScript to log the values of variables and the execution flow of your script. 3. If the issue persists, you might need to modify your script to handle the changes in the 2025.2 release. For example, you might need to use the
record.load
function to load the record before setting the values of fields. Remember to test your changes in a sandbox environment before deploying them 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. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.847167969
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846984863
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.842285216
Please provide your feedback on this answer.
t
Not sure if this helps the next person but I solved the issues by moving some code from beforeSubmit to afterSubmit. Permission changes which I couldn’t find documented anywhere on currentRecord.setValue and record.attach are affecting non-Admins and everything works if I store values in a custom field then do the work afterSubmit.