Reputation: 927
I could get record by below code
record.load(recordType, id)
For above function, both args are required.
Any way to get record by id alone without recordType in netsuite suitescript 2.0?
Upvotes: 1
Views: 3465
Reputation: 608
That is not possible, you do have to get the recordType but in case your records are transactions such as: Sales Orders, Purchase Orders, Invoices, etc.
You can use the following code to get the recordType only having the id:
var recordType = search.lookupFields({
type: search.Type.TRANSACTION,
id: your_record_id,
columns: 'type'
});
then you can use the record.load for your needs.
Upvotes: 6