how do i get data from a record, and use the same ...
# suitescript
s
how do i get data from a record, and use the same data to fill another empty record? Do you understand?
s
look into
record.copy()
😄 1
s
Thanks
How do I pass the data to another record, in this case, the empty one?
Is it the same method?
s
are you trying to copy between two different record types?
😃 1
record.copy()
let's you make a copy of a single record type, e.g. make a duplicate of a
SalesOrder
😃 1
s
They are different records, but they connect. He understands?
s
In that case, I'd use NFT and
_.assign()
😄 1
others here can offer up more complex solutions.
😄 1
s
Thank you very much. This will help me a lot.
I'm new to suitescript. So any information is welcome. Thank you again
s
I recommend NFT if you're new to suitescript but know TypeScript/modern JS
s
Where can I find this material for study?
s
Perfect! Thank you very much, friend. This will help me a lot.
b
the answer to this question is usually Record.getValue on the original record followed by Record.setValue on another record
😄 1
the question is basic enough that you probably want to learn SuiteScript 2.x Scripting Records and Subrecords first
😃 1