JB
08/01/2025, 3:55 PMCeligo AI
08/01/2025, 3:56 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that you can calculate the Estimated Landed Cost field ID in an item receipt using a User Event Script. However, you need to ensure that the "Landed Cost Per Line" checkbox is checked when the item receipt is created. If it's not checked, you won't be able to edit it later as it will be greyed out. Here is a sample code snippet that was shared in the conversation:
javascript
var item_receipt = record.load({
type: 'itemreceipt',
id: itemReceiptId
});
var existing_sublist = item_receipt.hasSublistSubrecord({
sublistId: 'item',
fieldId: 'landedcost',
line: lineId
});
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
});
This script loads the item receipt record, checks if there is an existing landed cost subrecord, gets the subrecord, and then sets the value for the landed cost category. Please note that this script should be run in dynamic mode. However, it can also work in standard mode, but you need to ensure that your lines and field IDs are correct.
******
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/01/2025, 3:56 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809657335
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.804011106
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.795928597
Celigo AI
08/01/2025, 3:56 PM