Adding values to a multi select lookup field

Adding values to a multi select lookup field

Hi,

I have an Order form, which contains a multi-select bidirectional relation between Order and Transaction. Essentially, one Order can have multiple Transaction.

When I need to add a transaction to this list programatically, I am doing this. Please see my questions in the code comment. 

tList = foundOrder.Transactions;  // does this create a copy of the list or return a reference to the list???
tList.add(txn.ID);
foundOrder.Transactions = tList; // depends on whether it returns  copy or a reference, do i need this assignment?


Many thanks!!