SSS_INVALID_SUBLIST_OPERATION when attempting reco...
# ask-stanley-ai
e
SSS_INVALID_SUBLIST_OPERATION when attempting record.selectNewLineItem(‘fedexpackage’); on an item fulfillment with integrated shipping turned on
c
AI generated answer (using internal Slack threads):
The error
SSS_INVALID_SUBLIST_OPERATION
typically occurs when you are trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist. In the context of your question, it seems like you are trying to select a new line item on the 'fedexpackage' sublist of an item fulfillment record with integrated shipping turned on. From the conversations, it appears that the 'fedexpackage' sublist might not be available or accessible due to the FedEx integration not being enabled in the environment you are working in. One of the users mentioned that they encountered a similar issue and found out from NetSuite support that the FedEx integration was not enabled in their sandbox environment. In addition, it's important to note that the sublistId for the package sublist should be 'packagefedex' and not 'fedexpackage'. Also, when working with sublists, you should use sublist related APIs like
record.setCurrentSublistValue
. Here is a corrected version of your code:
Copy code
javascript
const packageLine = sourceRecord.selectNewLine({
  sublistId: 'packagefedex'
});

packageLine.setValue({
  fieldId: 'packageweightfedex',
  value: 7
});

packageLine.setText({
  fieldId: 'packagetrackingnumberfedex',
  text: 'F1234567890'
});

packageLine.commitLine({
  sublistId: 'packagefedex'
});
Remember to ensure that the FedEx integration is enabled in your environment and that you are using the correct sublistId and fieldIds. ****** 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.851013243
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836914122
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831482
Please provide your feedback on this answer.