Solution
We can attach records to a support case by following code syntax :
record.attach({
record:{ id: caseid, type: record.Type.SUPPORT_CASE},
to: {id: id, type: ‘transaction’}
});
Where case id – case record internal id
id : internal id of the transaction which we want to attach
Module : N/record