Ron
08/14/2025, 1:48 PMCeligo AI
08/14/2025, 1:48 PMAI generated answer (using internal Slack threads):Based on the conversations provided, it appears that you can access and manipulate the landed cost tab on an Item Receipt via SuiteScript. However, there are a few things to note: 1. You need to load the item receipt record in your script. Here's a sample code snippet:
code
var item_receipt = record.load({
type: 'itemreceipt',
id: itemReceiptId
});
2. You can check if a landed cost sublist subrecord exists on a specific line of the item receipt:
code
var existing_sublist = item_receipt.hasSublistSubrecord({
sublistId: 'item',
fieldId: 'landedcost',
line: lineId
});
3. If the landed cost sublist subrecord exists, you can get it and set its values:
code
var existing_landed_cost = item_receipt.getSublistSubrecord({
sublistId: 'item',
fieldId: 'landedcost',
line: lineId
});
existing_landed_cost.setSublistValue({
sublistId: 'landedcostdata',
fieldId: 'landedcostcategory',
value: 1,
line: lineId
});
4. It's important to note that this approach works in both standard and dynamic modes. However, you need to ensure that your line numbers and field IDs are correct.
5. If you're encountering unexpected errors, it might be due to the absence of a landed cost subrecord. In such cases, you might need to create a sublist subrecord.
******
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
08/14/2025, 1:49 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838146448
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838018298
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837463439
Celigo AI
08/14/2025, 1:49 PM