does this error when creating a sales order ""typ...
# ask-stanley-ai
l
does this error when creating a sales order ""type":"error.SuiteScriptError","name":"INVALID_FLD_VALUE","message":"You have entered an Invalid Field Value CUSTOM for the following field: costestimatetype"" means that I'm not imputing the correct amount on the item price? other orders are created with this same costestimatetype without problem.
c
AI generated answer (using internal Slack threads):
The error message you're seeing, "INVALID_FLD_VALUE", indicates that the value you're trying to set for the field 'costestimatetype' is not valid. This doesn't necessarily mean that you're not inputting the correct amount on the item price. It's more likely that the value 'CUSTOM' you're trying to set for 'costestimatetype' is not a valid option for that field. In NetSuite, the 'costestimatetype' field usually accepts specific values like 'AVGCOST', 'PURCHORDERRATE', etc. If 'CUSTOM' is not a predefined value for this field, trying to set it will result in the error you're seeing. From the conversations, it seems that you can set the 'costestimatetype' field via script, but you need to ensure that the value you're setting is valid. You can use the
Field.getSelectOptions
method in dynamic mode to check what your options are for this field. Also, if you're trying to set this field in a user event script, make sure you're setting it after sourcing is complete, otherwise, it's being overwritten. You should be using the 'postSourcing' function for this. ****** 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.861504734
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.855481744
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.85299927
Please provide your feedback on this answer.