Getting below error when i set price level on item...
# ask-stanley-ai
v
Getting below error when i set price level on item level using script {"name":"THAT_RECORD_IS_NOT_EDITABLE","message":"That record is not editable.","stack":["Error"," at RecordInvoker.save (suitescript/resources/javascript/record/serverRecordService.js36723)"," at NetSuiteObject.thenableFunction() (suitescript/resources/javascript/record/proxy.js11524)"," at Object.beforeLoad (/SuiteScripts/update_item_price_list_ue.js10932)"]}
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like you're encountering an error when trying to set the price level on an item using a script. The error message "That record is not editable" suggests that the record you're trying to modify is not in a state that allows editing. This could be due to several reasons: 1. The record is locked or in use by another process. 2. The record is in a state that does not allow modifications (for example, a posted transaction). 3. The user role does not have the necessary permissions to edit the record. 4. The record is being accessed in a context that does not allow editing (for example, in a User Event script's beforeLoad function). In the context of SuiteScript, this error is often encountered when trying to save a record in a User Event script's beforeLoad function, which is a read-only event. If you're trying to modify the price level of an item in a Sales Order, it's important to note that the item field sources in the price level field, which will overwrite the changes you make. You might want to use the postSourcing function instead. If you're trying to create new inventory items via a suitelet and encountering issues with the price level sublist, you might be trying to access a field on a non-existent line or trying to add or remove lines from a static sublist. Make sure to select the correct line before setting sublist values. Remember, the ordering of price levels can be different per account and can actually change over time. Don't rely on the order of the price levels, find it yourself. ****** 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.888349354
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.883523762
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.875487328
Please provide your feedback on this answer.