Rick Goodrow
02/11/2025, 3:43 PMbeforeLoad
, you can set a list/record (transaction) field by using Internal IDs using record.setValue()
. When the record displays to the user it shows the transaction ID (Document Number) in that list/record field, so the data is there.
However also within the beforeLoad
event, you can't use record.getText()
on that same field you just used record.setValue()
to get the transaction ID due to a SuitesSript limitation. Currently the only way I can see getting around it is to do a Nsearch.lookupFields()
for each internal ID that I'm setting with record.setValue()
to get the transaction number. Even switching to a Nsearch.load().run()
seems wasteful, as the record obviously has the transaction ID at the time it loads, I just can't see a way to access it.
Does anyone know of a way to get the transaction ID off of the field natively without resorting to a search for every record create/edit?