andreas berndt
09/09/2024, 2:58 PMCeligo AI
09/09/2024, 2:58 PMAI 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:
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.
******Celigo AI
09/09/2024, 2:58 PMSlack 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
Celigo AI
09/09/2024, 2:58 PMandreas berndt
09/09/2024, 3:00 PMandreas berndt
09/09/2024, 3:03 PM