why am i unable to see the document number on a cu...
# ask-stanley-ai
q
why am i unable to see the document number on a customer refund
c
AI generated answer (using internal Slack threads):
The document number on a customer refund is automatically generated by NetSuite and is based on the check number field. It is not directly editable. However, you can override this number using a SuiteScript after submit user event. Here is a code sample that was shared in the threads:
Copy code
javascript
let documentLookup = search.lookupFields({
    type    : search.Type.CUSTOMER_REFUND,
    id      : recordID,
    columns : ['transactionnumber']
});
let values = {};
values.tranid = documentLookup.transactionnumber;
record.submitFields({
    type   : record.Type.CUSTOMER_REFUND,
    id     : recordID,
    values : values
});
In this code, a lookup is performed to get the transaction number of the customer refund. This value is then used to set the
tranid
field of the customer refund record. Note that the
tranid
field is being set, not the
transactionnumber
field. Please ensure that you are using the correct field (
tranid
), and that you are loading the record independently, as you cannot directly edit the record object passed in the parameters of a user event. ****** 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.825317442
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808838
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807800353
Please provide your feedback on this answer.