Items : Calculate Est. Landed Cost field ID
# ask-stanley-ai
j
Items : Calculate Est. Landed Cost field ID
c
AI generated answer (using internal Slack threads):
The field ID for the 'Calculate Est. Landed Cost' checkbox in NetSuite is
custitem_calculate_est_landed_cost
. This field is a checkbox that, when checked, enables the calculation of estimated landed costs for the item. However, it's important to note that this field is not editable once the item receipt is saved. If you forget to check this box before saving, you won't be able to edit it later as it will be greyed out. If you want to automate the process of checking this box, you might need to use a User Event Script. This script can be triggered when the item receipt is being created or edited, and it can programmatically check the 'Calculate Est. Landed Cost' checkbox. Here's a simple example of how such a script might look:
Copy code
javascript
/**
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 */
define(['N/record'], function(record) {
    function beforeSubmit(context) {
        if (context.type !== context.UserEventType.CREATE && context.type !== context.UserEventType.EDIT)
            return;

        var newRecord = context.newRecord;
        newRecord.setValue({
            fieldId: 'custitem_calculate_est_landed_cost',
            value: true
        });
    }

    return {
        beforeSubmit: beforeSubmit
    };
});
This script will automatically check the 'Calculate Est. Landed Cost' checkbox every time an item receipt is created or edited. ****** 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.800970793
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.788125932
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.78615427
Please provide your feedback on this answer.