Mark
05/02/2025, 2:04 PMCeligo AI
05/02/2025, 2:04 PMAI generated answer (using internal Slack threads):The error message "Items you have requested in the record have been deleted since you retrieved the form" typically occurs when you are trying to save a record (like a Sales Order or Inventory Detail) and one or more of the items on the record have been deleted in the meantime. This could happen if another user or process has deleted an item while you were working on the record. It could also occur if your script is trying to reference an item that has been deleted. To resolve this issue, you should ensure that all items referenced in your record do exist. You can do this by checking the item's existence before trying to save the record. If the item does not exist, you should handle this in your code, either by skipping the item or by providing a suitable replacement. Here's a simple example of how you might check for an item's existence in SuiteScript:
javascript
var itemId = 123; // replace with your item's internal id
var itemRecord = record.load({
type: record.Type.INVENTORY_ITEM,
id: itemId,
isDynamic: true
});
if (!itemRecord) {
log.error({
title: 'Item not found',
details: 'The item with id ' + itemId + ' does not exist.'
});
// handle the error, e.g. skip the item or replace it
}
******
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
05/02/2025, 2:04 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829972684
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81837374
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817681789
Celigo AI
05/02/2025, 2:04 PM