How do I update the costestimate item field on an ...
# ask-stanley-ai
a
How do I update the costestimate item field on an invoice?
c
AI generated answer (using internal Slack threads):
To update the costestimate item field on an invoice, you can use SuiteScript. However, it's important to note that this field is not directly editable on the invoice record. The costestimate field is derived from the item record and is used in the calculation of the Est. Extended Cost on the invoice line. Here's a basic example of how you might update the costestimate field on the item record using SuiteScript:
Copy code
javascript
var itemRecord = record.load({
    type: record.Type.INVENTORY_ITEM, 
    id: 'your_item_id'
});

itemRecord.setValue({
    fieldId: 'costestimate',
    value: 'your_new_cost_estimate'
});

var recordId = itemRecord.save({
    enableSourcing: true,
    ignoreMandatoryFields: true
});
This script loads the item record, sets the new costestimate, and then saves the record. After running this script, the new costestimate should be reflected on any new invoices created with this item. Remember to replace 'your_item_id' and 'your_new_cost_estimate' with your actual item ID and new cost estimate. ****** 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.833777964
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82729429
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823886
Please provide your feedback on this answer.
a
Ok thanks. So it cannot be updated via csv import?
Can costestimate on an invoice be updated via csv import?