why would a client script field changed only work ...
# ask-stanley-ai
n
why would a client script field changed only work if i'm editing and not creating netsuite
c
AI generated answer (using internal Slack threads):
In NetSuite, the
fieldChanged
event in a client script is triggered when a field value is changed and the field loses focus. This event is not triggered when a record is being created because at that point, there are no previous field values to compare with, hence no change is detected. The
fieldChanged
event is designed to react to changes in existing data, so it works when you're editing a record because it can compare the new value with the old one. When creating a record, all fields are initially empty or set to their default values, so there's no "change" to trigger the
fieldChanged
event. If you need to perform some action when a field is set during record creation, consider using the
validateField
or
postSourcing
events instead. The
validateField
event is triggered whenever a field value is set, and the
postSourcing
event is triggered after a sublist field or body field is set from a sourced field. ****** 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.839897335
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838382125
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836229146
Please provide your feedback on this answer.