Nicholas Williams
06/02/2025, 5:09 PMinvoice.setCurrentSublistValue({ sublistId: 'item', fieldId: 'costestimate', value: 12 });
Chris
06/03/2025, 9:15 PMNicholas Williams
06/04/2025, 12:34 AMPatrick A.
06/05/2025, 4:24 AMcostestimatetype
to Custom?
I've built a script before for Estimate records that updates the costestimate
, and I had to explicitly set the costestimatetype
in order for it to work.Nicholas Williams
06/05/2025, 6:47 PMChris
06/05/2025, 6:49 PMPatrick A.
06/05/2025, 10:31 PMCUSTOM
.
A possible reason it works for the Inventory Item but not for the Non-Inventory Item is that the Inventory Item record has its Cost Estimate Type set to Custom, while the Non-Inventory Item does not. This setting must be explicitly defined for the script to update the costestimate
field correctly.
When you add an item to a transaction, NetSuite references the Cost Estimate Type from the item record and uses it as the default value for the line item.
I suggest always use CUSTOM
when you want to changes your costestimate
, that way you can still set the costestimate
even if the item's Cost Estimate Type is not CUSTOM
.